Board logo

subject: 310-065 Practice Test [print this page]


Exam : SUN 310-065 Exam
Title : Sun Certified Programmer for the Java 2 Platform. SE 6.0
1. Given:
11. public static void main(String[] args) {
12. Object obj = new int[] { 1, 2, 3 };
13. int[] someArray = (int[])obj;
14. for (int i : someArray) System.out.print(i + );
15. }
What is the result?
A. 1 2 3
B. Compilation fails because of an error in line 12.
C. Compilation fails because of an error in line 13.
D. Compilation fails because of an error in line 14.
E. A ClassCastException is thrown at runtime.
Answer: A
2. Given:
1. public class Boxer1{
2. Integer i;
3. int x;
4. public Boxer1(int y) {
5. x = i+y;
6. System.out.println(x);
7. }
8. public static void main(String[] args) {
9. new Boxer1(new Integer(4));
10. }
11. }
What is the result?
A. The value 4 is printed at the command line.
B. Compilation fails because of an error in line 5.
C. Compilation fails because of an error in line 9.
D. A NullPointerException occurs at runtime.
E. A NumberFormatException occurs at runtime.
F. An IllegalStateException occurs at runtime.
Answer: D
3. Given:
31. // some code here
32. try {
33. // some code here
34. } catch (SomeException se) {
35. // some code here
36. } finally {
37. // some code here
38. }
Under which three circumstances will the code on line 37 be executed? (Choose three.)
A. The instance gets garbage collected.
B. The code on line 33 throws an exception.
C. The code on line 35 throws an exception.
D. The code on line 31 throws an exception.
E. The code on line 33 executes successfully.
Answer: BCE

If you only purchased SUN Other Certifications Programmer for the Java Platform, Standard Edition 6.0 book to prepare for the Sun Certified Programmer for the Java Platform, Standard Edition 6.0 exam(310-065), unfortunately, you have chosen a time-consuming and expensive way. Good learning method determines the success.

Before you make your decision to buy our product, you can try our free Demo for 310-065 Exam (Sun Certified Programmer for the Java Platform, Standard Edition 6.0) . You can try it online or download it. In this way, you will know the quality and usability of TestInside 310-065 practice exam and make your best choice.

Hot Exams:
ST0-47X Symantec NetBackup 6.5 (STS)
ST0-075 Symantec Data Loss Prevention 9.0 (STS)

by: Eileen




welcome to loan (http://www.yloan.com/) Powered by Discuz! 5.5.0