NavigableSet API is included in the ocpjp 6 certification exam. This article explains few important methods with simple example program.NavigableSet is the subinterface of SortedSet. This interface defines methods for finding the element in a list. For example lower() method used for finding the element which is less than the given value. Look into the following example: In the …
Certifications
OCPJP 8 / OCPJP 7 Exam Details
The Oracle Certified Professional for Java Platform, Standard Edition 6 certification exam is for programmers experienced using the Java programming language. Achieving this certification provides clear evidence that a programmer understands the basic syntax and structure of the Java programming language and can create Java technology applications that run on server and desktop systems using …
OCPJP 6 Mock Exam – 21
1 . Given: Which two construct an anonymous inner class? Choose the two below: AnAdapter1 aa = new AnAdapter1 () {} AnAdapter0 aa = new AnAdapter0 () {} AnAdapter0 aa = new AnAdapter0 (5) {} AnAdapter1 aa = new AnAdapter1 (5) {} AnInterface ai = new Anlnterface (5)) { 2 . What will be the …
OCPJP 6 Mock Exam – 20
1 . Which of the following are valid array construction? int a[] = new int[]; int a[] = new int[10]; int a[10] = new int[]; int a[] = new a[10]; 2 . Which of the following are valid array initialization? new int[] = {1,2,3,4}; new int[10] = {1,2,3,4}; new int[] = 1,2,3,4; new int[] = …
OCPJP 6 Mock Exam -18
1 . What will be the output? Choose the one below: Base(){} Base(long l){} Base(float f){} It will compile properly 2 . What will be the output? Choose the one below: 2 4 Compiler Error It will compile if we add super(2) in Test2() 3 . which of the following keywords can be applied to …
OCPJP 6 Mock Exam -16
1 . What will be the output? Choose the one below: Compile time error at line 10 Compilation and output of 123 Compilation and output of the digits “1”, “2” and “3”, but the order can’t be determined Compilation and output of onetwothree Compilation but runtime error at line 10 2 . The following is …
OCPJP 6 Mock Exam -15
1 . Which of the following can prevent a thread from executing? A call to its pause method A call to Thread.yield() Another thread is given higher priority A call to its halt() method 2 . Which of the following represent correct syntax for assertions? assertion(b==false); assert (b==false); assert() b==false; if(b!=true) assert; 3 . What …
OCPJP 6 Mock Exam -14
1 . Given Answer class behaves like some a File it has a Vector, a color, some boolean variable.What is the correct declaration? import public private Vector Serializable File Color extends boolean implements 2 . Some design issues: The following description applies to a class: given someclassname behaves as somesuperclassname and it has some fields …