Thursday, 19 June 2014

TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA - SET 2


  

TECHNICAL INTERVIEW AND PRACTICE QUESTIONS ON JAVA 
 SET 2




1. Consider the following statement

    system .out.print ( math .round (math .random()));

This can print


(A)  only 0
(B) only 1
(C) only 0 or 1
(D) Any non-negative integer




2. Is null an object?


(A)  Yes
(B) No
(C) Sometimes yes
(D) None of these




3. Which of the following is used to get the error message for exception that was thrown?


(A) printMessage 
(B) extractMessage
(C) thrownMessage 
(D)  getMessage




4. Subclass is also called as



(A)  Baseclass
(B) Child class 
(C) Derived class
(D) Superclass



CLICK HERE TO SEE THE ANSWER

ANSWER IS (B) AND (C)


5. Which of the following will results in compilation error ?


(A) signed int abc;
(B)  unsigned int abc;
(C) signed byte abc;
(D) signed long abc;




No comments:

Post a Comment