Java MCQ
Java MCQ
Java MCQ
A.James Gosling
B.M. P Java
C.Charel Babbage
D.Blais Pascal
Answer : James Gosling [Option : A]
Q. Which variables are created when an object is created with the use of the
keyword 'new' and destroyed when the object is destroyed?
A.Local variables
B.Instance variables
C.Class Variables
D.Static variables
Answer : Instance variables [Option : B]
C.
|=' Operator
D.
<=' Operator
Show Answer
Q. Which of these is returned by Greater Than, Less Than and Equal To (i.e
Relational) operator ?
A.
Fload
B.
Integer
C.
Boolean
D.
Double
Answer : Boolean [Option : C]
Show Answer
Q. Which statement transfer execution to different parts of your code based on the
value of an expression?
A.
If
B.
Switch
C.
Nested-if
D.
if-else-if
Answer : Switch [Option : B]
Show Answer
C.
Both A and B
D.
None of These
Show Answer
C.
Multiple inheritances
D.
Multilevel inheritance
Answer : Hierarchical inheritance [Option : A]
Show Answer