1. C, D, E - strings cannot be shifted as objects, and they are not an array of chars. |
2. B - A set is a collection that contains no duplicate elements. A list is an ordered collection. |
3. B, C - B&C are valid declarations and not C&D. While ONLY declaring the array reference variable you can not decalre the size of the array. |
4. new Outer().new Inner(); - |
5. synchronized - |
6. MouseEvent - |
7. C - Public, automatic or local variables cannot be declared as public ,private or..? |
8. B - |
9. void - |
10. A, B - |
11. A, C - |
12. B, D - |
13. D - |
14. C - |
15. final - |
16. public void run() {} - |
17. B - in the code animals is assign as a class variable not as a static so it has to be defined in main() as a String. 'cat' is stored in the args[0]. |
18. A, C, D, F - Valid are all that starts with _ ,$ , a-z A-Z etc but not with numbers etc. |
19. E - No comment |
20. A, C - |
21. B, F, G, H - |
22. C - str is null so it will throw a nullpointer exception which will print 'and' after a System.exit(0) the finally will not be executed. |
23. public final class someclassname extends somesuperclassname {} - |
24. public class Answer extends File implements Serializable { - |
25. B, E, H - |
26. this(a) or this(a,b) or this.c=c or this.c=a or this.c=b ; |
27. A, B, D - |
28. 07 - |
29. B - |
30. C, D - Yes I deliberatly miss out one of the square brackets or is it a part of the question in 'D'. *smile* |
31. A, B, C - |
32. void - |
33. public class Employee extends Person - |
34. A, C - |
35. B, C - |
36. D - |
37. C, D, E - |
38. B - The answer is 'B' because in the API documentation all the Listener Interfaces have "public void method()". |
39. C - |
40. D - |
41. B - |
42. C - |
43. C - |
44. C, D, E - |
45. B, C - |
46. A, B, D, E - |
47. D, E - E suppose they mean the method declaration for someTestFails. |
48. E - |
49. D, E - |
50. C, E - |
51. A, B - |
52. B, C, D - |
53. B, C, F - |
54. E - |
55. A, B, D, E - Non-runnable states: * Suspended: caused by suspend(), waits for resume() * Sleeping: caused by sleep(), waits for timeout * Blocked: caused by various I/O calls or by failing to get a monitor's lock, waits for I/O or for the monitor's lock * Waiting: caused by wait(), waits for notify() or notifyAll() * Dead: Caused by stop() or returning from run(), no way out |
56. A, C - |
57. A, B, C, D - |
58. E - |
59. D, E - |
60. C - |
61. A - |
62. B, C - |
63. A, E - B is wrong because of case-sensitivity. C is wrong because multiple inheritance is not supported in Java. D is wrong because a class can only be public, abstract, final or default (with no access modifier). |
64. A, C - |
65. C - |
66. A, B - |
67. A - |
68. B - |
69. B - |
70. D, E - |
71. B, D - |
72. this(a); - |
73. this(a,b); - |
74. C, D, E - |
75. A, D - |
76. B - |
77. D - Compiler says variable x might not have been initialized. |
78. A - |
79. C - |
80. B - |
81. A - Illegal both at compile and runtime. You cannot assign an object to a sibling reference, even with casting. |
82. B, D - |
83. A - |
84. C - |
85. D - |
86. D - |
87. B - |
88. C - |
89. C - |
90. B - |
91. B - |
92. A - |
93. A - |
94. public static final char CODE='\u30a0'; - |
95. A, B, C, D - |
96. C, E - |
97. B, D - |
98. A - |
99. A, C - |
100. C - |
The Notes
More is added to the list, but what I realy need is your help to keep
this information up-to-date and may be it needs correcting in one way
or the other. Please feel free to help me complement these question
and answers drop us an email at this
address. (C) 1998-2001, BMC88 - Personal WebSite of Java Certification
Exams
Part I
Part II
Part III
Part IV
Answers{submenus}
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
|||
![]() |
![]() |
![]() |
![]() |
|
![]() |
![]() |