1.                   What does the term “instantiating a class” mean ?

2.                   Which operator is used to create an object ?

3.                   Name the package that is available by default & need not be imported ?

4.                   Classify the following under any one of the following : keyword / operator / literal

for , ‘A’ , break ,  =  ,  true ,  else ,  43.5  , %    

5.                   Differentiate between an instance variable & a local variable.

6.                   What are wrapper classes ? Name any two.

7.                   State the task of the following :

a) java compiler           b)    java interpreter

8.                   What is the smallest individual unit of a program known as ?

9.                   Write the following statement using shorthand notation  : a = a/(n+1) ;

10.                What does the this keyword signify ?

11.                Given the following declaration :

boolean x;

char w;

String s;

In what way are the identifiers x & w different from the identifier s ?

12.                Given the following code fragment :

String s1=”abc”;

String s2=”def”;

S3=s1.concat(s2.toUpperCase());

System.out.println(s1+s2+s3);

 

Write the output of the above.

13.                Write the output of the following segment of code :

 

int c,x,y;

for(x=1;x<6;x++)

   {

   c=6;

for(y=1;y<6;y++)

               {

                  if (y<=x)

                      c--;

                  System.out.print(c);

               }                   

            System.out.println();

            }

 

Hosted by www.Geocities.ws

1