Get the FREE certificate on C, C++, Java, Python, Perl, PHP, SQL, Linux & Javascript!  

CppBuzz.com
  
Home C C++ Java Python Perl PHP Spring SQL Javascript Linux Forum

You are here : Home » Java » Java Interview Questions on Classes & Objects

Java Interview Questions on Classes & Objects - 24 Questions


Question: 1

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 2

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

Practitioner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 3

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 4

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 5

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 6

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 7

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 8

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 9

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 10

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

Practitioner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 11

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

Expert classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 12

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

Beginner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 13

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

Expert classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 14

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

Expert classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 15

(A) Yes
(B) No

Practitioner classesAndobjects[Posted by: ASISH ARAVIND | Des Moines USA]



Question: 16

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

Expert classesAndobjects[Posted by: ASISH ARAVIND | Des Moines USA]



Question: 17

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

Expert classesAndobjects[Posted by: ASISH ARAVIND | Des Moines USA]



Question: 18

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

Expert classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 19

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

Practitioner classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 20

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

Expert classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 21

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

Expert classesAndobjects[Posted by: Arvind | Navi Mumbai India]



Question: 22

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

Practionar classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 23

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

Practionar classesAndobjects[Posted by: Admin | Chicago, USA]



Question: 24

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

Practionar classesAndobjects[Posted by: Admin | Chicago, USA]


[Contribute to this Website]


Java Objective Questions By Different 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 | Serialization | Multithreading | Networking | Sending Email | Applet Basics | Other