jQuery in Action, 3rd edition
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes sun's sample questions. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "sun Watch "sun New topic

sun's sample questions.

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
i am not able to access the sun's sample questions in any of the sites.
can any one please mail me the sun's sample questions to
please do mail me the sample questions. i will be very grateful to you. i heard that there are sun's sample questions for java1.1 and java2. please do mail me as soon as possible.
i am going to take the exam on august 30th.
aparna kodali

Joined: Oct 17, 2005
Posts: 6
Hi ragavan!
This is the site

be cool and All the Best

Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Here are the sample questions from the Sun site http://suned.sun.com/USA/certification/progsq.html
These questions are for Java 2

1. What would be the result of attempting to compile and run the following piece of code?
public class Test {
static int x; public static void main
(String args[ ])
{System.out.println("Value is " + x);}
A.The output "Value is 0" is printed.
B.An object of type NullPointerException is thrown.
C.An "illegal array declaration syntax" compiler error occurs.
D.A "possible reference before assignment" compiler error occurs.
E.An object of type ArrayIndexOutOfBoundsException is thrown.

2. What should you use to position a Button within an application Frame so that the size of the Button
is NOT affected by the Frame size?
A.a FlowLayout
B.a GridLayout
C.the center area of a BorderLayout
D.the East or West area of a BorderLayout
E.the North or South area of a BorderLayout

3. Which is the advantage of encapsulation?
A.Only public methods are needed.
B.No exceptions need to be thrown from any method.
C.Making the class final causes no consequential changes to other code.
D.It changes the implementation without changing the interface and causes no consequential
changes to other code.
E.It changes the interface without changing the implementation and causes no consequential
changes to other code.

4. Which of the following most directly supports retrieval of stored objects based on a unique key of
String type?

5. Which statement is true about a non-static inner class?
A.It must implement an interface.
B.It is accessible from any other class.
C.It can only be instantiated in the enclosing class.
D.It must be final if it is declared in a method scope.
E.It can access private instance variables in the enclosing object.

6. Which are keywords in Java (select all that apply)?

7. Which declares an abstract method in an abstract Java class?
A.public abstract method();
B.public abstract void method();
C.public void abstract Method();
D.public void method() {abstract;/}
E.public abstract void method() {/}
I agree. Here's the link: http://aspose.com/file-tools
subject: sun's sample questions.
It's not a secret anymore!