ICSE Class X Computer Applications ( Java ) Solved Model Question Papers 02

Question 3.
a.       What is meant by the private visibility of a method?
Ans:  The visibility of private method restricted to the class itself. It is not visible to anywhere outside the class.
b.      What is a variable?
Ans: A variable is a named memory location whose value can change. Example int a,b;
c.       What is the use of return keyword?
Ans: A return keyword is used to return any value from a function. It denotes the end of a function.
d.      What is call by value?
Ans: In call by value arguments are passed by the value, which means that a copy of the arguments is passed to the method can make changes to the value of this copy but can not change the values of the original variables in the calling method.
e.      What is meant by an infinite loop? Give an example.
Ans: An infinite loop is a loop whose test condition is always true. This type of loop never ends by itself. For example:
for(i=1;i>0;i++)
{
        System.out.println(“Hello”);
}
f.        State any two objectives of using Arrays.
Ans:  1. Use hold elements in contiguous memory location. 2. Arrays are used to group storage locations.

No comments:

Post a Comment