GkSeries.com

Objects and Classes - Java MCQs with Answers

(1) Which of the following is an invalid declaration for the main method in java program?
[A] public static void main (String [ ] args)
[B] public static strictfp void main(String args[ ])
[C] final static public void main (String args[ ])
[D] All are Correct

Comment

Answer: Option [D]
(2) A top level class may have which one of the following access modifiers?
[A] package
[B] private
[C] protected
[D] public

Comment

Answer: Option [D]

DOWNLOAD CURRENT AFFAIRS PDF FROM APP

(3) Visualizing program components as objects is characteristics of which of the following language types?
[A] Object-oriented programming language
[B] Machine language
[C] Command line operating system
[D] Procedural language

Comment

Answer: Option [A]
(4) A subclass is also called as
[A] inner class
[B] nested class
[C] derived class
[D] hidden class

Comment

Answer: Option [C]
(5) Attribute of an object can include information about
[A] State
[B] Method
[C] Behavior
[D] Procedures

Comment

Answer: Option [A]

Please share this page

Chapters

Click Here to Read more questions

Teacher Eligibility Test