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
(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
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