Interview Questions on C C++

Home  |  About Us  |  Contact
View Questions Contribute Training Misc..

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

Java Interview Questions on Classes & Objects - 20 Questions


Question: 1

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

[Posted by: Admin | Location: Chicago, USA]



Question: 2

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

[Posted by: Admin | Location: Chicago, USA]



Question: 3

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

[Posted by: Admin | Location: Chicago, USA]



Question: 4

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

[Posted by: Admin | Location: Chicago, USA]



Question: 5

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

[Posted by: Admin | Location: Chicago, USA]



Question: 6

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

[Posted by: Admin | Location: Chicago, USA]



Question: 7

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

[Posted by: Admin | Location: Chicago, USA]



Question: 8

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

[Posted by: Admin | Location: Chicago, USA]



Question: 9

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

[Posted by: Admin | Location: Chicago, USA]



Question: 10

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

[Posted by: Admin | Location: 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

[Posted by: Admin | Location: Chicago, USA]



Question: 12

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

[Posted by: Admin | Location: Chicago, USA]



Question: 13

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

[Posted by: Admin | Location: Chicago, USA]



Question: 14

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

[Posted by: Admin | Location: Chicago, USA]



Question: 15

(A) Yes
(B) No

[Posted by: ASISH ARAVIND | Location: Des Moines USA]



Question: 16

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

[Posted by: ASISH ARAVIND | Location: Des Moines USA]



Question: 17

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

[Posted by: ASISH ARAVIND | Location: Des Moines USA]



Question: 18

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

[Posted by: Admin | Location: Chicago, USA]



Question: 19

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

[Posted by: Admin | Location: Chicago, USA]



Question: 20

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

[Posted by: Admin | Location: 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