wood burning stoves 2.0*
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


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "sun Watch "sun New topic
Author

sun's sample questions.

Anonymous
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
stud_rags_bits@yahoo.com
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
Greenhorn

Joined: Oct 17, 2005
Posts: 6
Hi ragavan!
This is the site
http://suned.sun.com/USA/certification/progsq.html

be cool and All the Best

kodali
Anonymous
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?
A.Map
B.Set
C.List
D.Collection
E.Enumeration

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)?
A.NULL
B.sizeof
C.friend
D.extends
E.synchronized

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() {/}
 
Don't get me started about those stupid light bulbs.
 
subject: sun's sample questions.