Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » Java » Java Interview Questions on Classes & Objects

Java Interview Questions on Classes & Objects - 24


Question: 1

(A) 0
(B) Compilation Error
(C) -10
(D) Garbage Value

Level: Beginner Category of MCQ: classesAndobjects



Question: 2

(A) -10
(B) Undefined
(C) Compilation Error
(D) 0

Level: Practitioner Category of MCQ: classesAndobjects



Question: 3

(A) 0
(B) 10
(C) -10
(D) Compilation Error

Level: Beginner Category of MCQ: classesAndobjects



Question: 4

(A) hi
(B) nothing is printed
(C) error: sum() has private access
(D) Exception

Level: Beginner Category of MCQ: classesAndobjects



Question: 5

(A) hi
(B) Compilation Error
(C) Nothing is printed
(D) Exception

Level: Beginner Category of MCQ: classesAndobjects



Question: 6

(A) hi
(B) Compilation Error
(C) Exception
(D) None of the above

Level: Beginner Category of MCQ: classesAndobjects



Question: 7

(A) hi
(B) Compilation Error
(C) Exception
(D) None of the above

Level: Beginner Category of MCQ: classesAndobjects



Question: 8

(A) hi
(B) Compilation Error
(C) Exception
(D) None of the above

Level: Beginner Category of MCQ: classesAndobjects



Question: 9

(A) hi
(B) Compilation Error
(C) Exception
(D) None of the above

Level: Beginner Category of MCQ: classesAndobjects



Question: 10

(A) error: sum() is private default
(B) hi
(C) Exception
(D) Nothing is printed

Level: Practitioner Category of MCQ: classesAndobjects



Question: 11

(A) Code runs but nothing is printed
(B) Code runs in infinite loop
(C) error: Main method not found
(D) Exception

Level: Expert Category of MCQ: classesAndobjects



Question: 12

(A) 1
(B) 2
(C) 3
(D) Max 256

Level: Beginner Category of MCQ: classesAndobjects



Question: 13

(A) Cap Cog
(B) Cap Cap
(C) Cog Cog
(D) Cap Cog Cap Cog

Level: Expert Category of MCQ: classesAndobjects



Question: 14

(A) Cap Cog
(B) Cap Cap
(C) Cog Cog
(D) Cap Cog Cap Cog

Level: Expert Category of MCQ: classesAndobjects



Question: 15

(A) Yes
(B) No

Level: Practitioner Category of MCQ: classesAndobjects



Question: 16

(A) 10203040
(B) 10203040Hello
(C) Hello
(D) None of these

Level: Expert Category of MCQ: classesAndobjects



Question: 17

(A) 10203040
(B) 10203040Hello
(C) Hello
(D) Nothing is printed

Level: Expert Category of MCQ: classesAndobjects



Question: 18

(A) null
(B) Nothing is printed
(C) Exception
(D) Compilation Error

Level: Expert Category of MCQ: classesAndobjects



Question: 19

(A) Hello
(B) Compilation Error
(C) Exception
(D) None of these

Level: Practitioner Category of MCQ: classesAndobjects



Question: 20

(A) Singletons
(B) Java Beans
(C) Transactions
(D) None of the above

Level: Expert Category of MCQ: classesAndobjects



Question: 21

(A) Anonymous inner class
(B) Interface
(C) Inner class
(D) All of the mentioned

Level: Expert Category of MCQ: classesAndobjects



Question: 22

(A) 00
(B) 05
(C) 50
(D) 55

Level: Practitioner Category of MCQ: classesAndobjects



Question: 23

(A) 100
(B) 1000
(C) 2
(D) 20

Level: Practitioner Category of MCQ: classesAndobjects



Question: 24

(A) 100
(B) 1000
(C) 2
(D) 20

Level: Practitioner Category of MCQ: classesAndobjects



Browse Java Categories

Datatype Variables Operators Decision Making Loops Methods Reference Variables Arrays Classes and Objects Abstract Class Singleton Class Modifiers Inheritance Overriding Polymorphism Abstraction Encapsulation Files and I/O TypeCasting Packages Exceptions Collections Framework Numbers Class Date & Time Regular Expressions Data Structures Interfaces Multithreading Other