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.
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() {/}
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.