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
3. Which of the following are valid identifers?
(A) $ABC
(B) _____(5 consecutive underscores)
(C) main
(D) protected
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
NEXT SET 6|| PREVIOUS SET 4
No comments:
Post a Comment