Test : Java_13
This test contains 10 questions based on Java.
Each question answered correctly awards you 1 point and each incorrect answer has a penalty of -0.25 points, no points are deducted for unattempted answers.
Each question answered correctly awards you 1 point and each incorrect answer has a penalty of -0.25 points, no points are deducted for unattempted answers.
Select Test Type
You Get +1 for each correct answer and -0.25 for each incorrect answer
Time Left - minutes :seconds
Which of the folowing stements are incorrect?
Default constructor is called at the time of declaration of the object if a constructor has not been defined. | Constructor can be parameterized. |
finalize() method is called when a object goes out of scope and is no longer needed. | finalize() method must be declared protected. |
Which of these operators is used to allocate memory for an object?
malloc | alloc |
new | give |
What is the return type of Constructors?
int | float |
void | None of the mentioned |
Which of these operators can skip evaluating right hand operand?
! | | |
& | && |
Which of these keywords is used to manually throw an exception?
try | finally |
throw | catch |
Which of these class is used to make a thread?
String | System |
Thread | Runnable |
What is the output of this program?
class box { int width; int height; int length; } class mainclass { public static void main(String args[]) { box obj = new box(); System.out.println(obj); } }
0 | 1 |
Runtime error | Garbage value |
Which powerful construct is used to solve the problem of multiple inheritance in abstract class
Pointers | Interfaces |
Abstract superclass | None of the above |
Which of these is an invalid declaration of char
line 1 :char c1='A';
line 2 :char c2=25;
line 3 :char c3=2.9;
line 1 | line 2 |
line 3 | line 2 & line 3 |
Which of these interface is implemented by Thread class?
Runnable | Connections |
Set | MapConnections |
Finish Test
No comments: