Objects and Classes - Java MCQs with Answers

Sports GK Questions and Answers 2024 (Latest Updated)

Awards & Honours GK Questions 2024 (Latest Updated)

Questions
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

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

Answer: Option [D]
Advertisement
Article and Schedule Quiz Start Test!
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

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

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

Answer: Option [A]

Chapters

Assam Direct Recruitment Test Series

Computer Science Topics