Home

Java Programming MCQ Question with Answer

Java Programming MCQ with detailed explanation for interview, entrance and competitive exams. Explanation are given for understanding.

Download Java Programming MCQ Question Answer PDF

Question No : 15
Which of the following keywords are used to control access to a class member?

default
protected
interface
None of the above

Question No : 16
The keywords reserved but not used in the initial version of Java re:

Synchronized
Boolean
union
goto

Question No : 17
A package is a collection of

classes
interface
editing tools
classes and interfaces

Question No : 18
Which of the following statements are true?

An abstract class may not have any final methods?
A final class may not have any abstracts methods.
Transient variables must be static.
all of the above

Question No : 19
The concept of multiple inheritance is implemented in Java by

extending two or more classes
extending one class and implementing one or more interfaces
all the above

Question No : 20
Which of the following statements are valid array declarations?

int number();
float average[];
double[] marks;
counter int[];

Question No : 21
Which of the following classes are available in the java.lang package?

Random
Stack
String Buffer
Vector