Can you please share the OCJP questions asked in the exam ?

classic Classic list List threaded Threaded
3 messages Options
Lokesh Lokesh
Reply | Threaded
Open this post in threaded view
|

Can you please share the OCJP questions asked in the exam ?

I heard that many of the Questions in OCJP exams gets repeated as it is. Can you please share the OCJP questions asked in the exam ?
buggybread buggybread
Reply | Threaded
Open this post in threaded view
|

Re: Can you please share the OCJP questions asked in the exam ?

There are lot Coding questions related to Method Overriding ( Final methods cannot be overridden , Valid Overriding , Can't reduce visibility in overriding ) and Valid Overloading.

Final Variables can be initialized with constructor but cannot be done in any method.

Intrinsic Modifiers for Interface variables and methods.

When is object eligible for garbage collection.

Anonymous inner class can be instantiated even by doing new with the interface.

run method of Thread can be called directly but that doesn't mean that a new thread is instantiated.

Sequence in which multiple runnable threads are executed is system dependent and cannot be predicted.

Catch blocks for try should handle exceptions from specific to general.

finally block is always executed whether an exception occurs or not.

How to access local inner class and static nested class elements.

How to access Enum defined in some other class.

Switch Default Case execution.

When the file gets created , Directory can be renamed or removed.  
www.buggybread.com
Akshit Akshit
Reply | Threaded
Open this post in threaded view
|

Re: Can you please share the OCJP questions asked in the exam ?

In reply to this post by Lokesh
Refer to the Exam check section in Kathy Serra. You will definitely get lot questions from those concepts. Some of the questions I remember -

peek and poll in priority queue
subset in Trees, adding few values and then answering the content of two trees
Valid method declarations keeping in mind the legal overloading and overridding
compareTo and compare methods belong to which interfaces.
equals and HashCode
public static and final can be valid modifiers for interface variables.
Valid class path setting upon compiling and executing java files
Inheritance and Composition questions which says "Man has a best friend who is a Dog"
Use of assert.