Thursday, 19 June 2014

TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 5





INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 5





1. Automatic conversion from priitive type to an object of the corresponding wrapper class is called

(A)  coercing
(B)  casting
(C) boxing
(D) widening 



2.  The fact that any program can print using system.out.print , implies that 

(A)  system is defined in the package java.lang
 (B) system is a class name
(C) out is an object 
(D) print is a method 



CLICK HERE TO SEE THE ANSWER

ANSWER IS  (A) , (B), (C) AND (D)


3. Which of the following are valid identifers?

(A) $ABC 
(B) _____(5 consecutive underscores)
(C) main
(D) protected



CLICK HERE TO SEE THE ANSWER

ANSWER IS (A) ,(B) AND (C)



4. The program given below 

   int x=1, m=0;
for (  ; m<10 ; ++m)
          x= x+x;
system.out.print(x);

prints

(A) 1024
(B) 512
(C)  2048
(D) 10 



5. Elements of an array have the same

(A) index
(B) value
(C) datatype 
(D) scope



CLICK HERE TO SEE THE ANSWER

ANSWER IS (C) AND (D)


NEXT SET 6|| PREVIOUS SET 4

No comments:

Post a Comment