github

Made bySaurav Hathi

MCQ Test Java: Object Oriented Programming 1

Q1:

How can we identify whether a compilation unit is class or interface from a .class file?

Tags:
Section:
Core Programming
Options:
Q2:

Which of these methods is used to register a keyboard event listener?

Tags:
Section:
Core Programming
Options:
Q3:

Which of these methods is used to register a mouse motion listener?

Tags:
Section:
Core Programming
Options:
Q4:

What is a listener in context to event handling?

Tags:
Section:
Core Programming
Options:
Q5:

Which of these methods can be used to determine the source of event?

Tags:
Section:
Core Programming
Options:
Q6:

Which of these classes is super class of all the events?

Tags:
Section:
Core Programming
Options:
Q7:

Which of these class is superclass of every class in Java?

Tags:
Section:
Core Programming
Options:
Q8:

In java, which of these keywords cannot be used for a class which has been declared final?

Tags:
Section:
Core Programming
Options:
Q9:

In java, you want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?

Tags:
Section:
Core Programming
Options:
Q10:

Which of the following is a valid declaration of an object of class Box in java?

Tags:
Section:
Core Programming
Options:
Q11:

Which of the following statements is correct for java?

Tags:
Section:
Core Programming
Options:
Q12:

Which of these keywords is used to refer to member of base class from a sub class?

Tags:
Section:
Core Programming
Options:
Q13:

What is it called when child object gets killed if parent object is killed?

Tags:
Section:
Core Programming
Options:
Q14:

Which of these statements is incorrect about java?

Tags:
Section:
Core Programming
Options:
Q15:

What is the process of defining more than one methods in a class differentiated by their method signatures?

Tags:
Section:
Core Programming
Options:
Q16:

What is true about private constructor in java?

Tags:
Section:
Core Programming
Options:
Q17:

Which of the following statements is not correct about constructors in java?

Tags:
Section:
Core Programming
Options:
Q18:

What is true about Class.getInstance() in java?

Tags:
Section:
Core Programming
Options:
Q19:

What is true about protected constructor in java?

Tags:
Section:
Core Programming
Options:
Q20:

What would be the behaviour if one parameterized constructor is explicitly defined in java?

Tags:
Section:
Core Programming
Options:
Q21:

Which of the following statements is incorrect about classes in java?

Tags:
Section:
Core Programming
Options:
Q22:

In java, which of these access specifiers must be used for class so that it can be inherited by another subclass?

Tags:
Section:
Core Programming
Options:
Q23:

In java, which of these keywords is used to prevent content of a variable from being modified?

Tags:
Section:
Core Programming
Options:
Q24:

Which of the following statements is incorrect about static methods in java?

Tags:
Section:
Core Programming
Options:
Q25:

Which of the following statements is incorrect about java?

Tags:
Section:
Core Programming
Options:
Q26:

Which of these statements is incorrect about java?

Tags:
Section:
Core Programming
Options: