Java : Programming Concept Questions & Answers
Question : Which one is true about a constructor ?
A.
A constructor must have the same name as the class it
is declared within.
B.
A constructor is used to create objects.
C.
A constructor may be declared private
D.
All of
the above
Correct Answer is : Option D.
- Which of these operators is used to allocate memory to array variable in Java?
- Which of these is not a bitwise operator?
- Which of these is returned by Greater Than, Less Than and Equal To (i.e Relational) operator ?
- Which statement transfer execution to different parts of your code based on the value of an expression?
- Modulus operator (%) can be applied to which of these?