English Русский Contacts Site map Add to favorites
Registration
Login
Master braindump list
New braindumps
Submit a dump
Get latest dump
braindumps.com.ua
flame
3COM (7)
Adobe (1)
BEA (1)
Checkpoint (22)
Cisco (20)
Citrix (21)
CIW (15)
Compaq (0)
CompTIA (51)
CWNA (2)
EMC (2)
Exin (4)
GEJOS (4)
HDI (1)
HP (4)
IBM (13)
Juniper (5)
Linux Prof Institute (LPI) (2)
Lotus (11)
Microsoft (2462)
Network Appliance (2)
Novell (16)
Oracle (423)
PLSQL (1)
PMI (5)
SAS (1)
Sun (87)
Teradata (4)
Login:
Password:
RSS feed

Contacts
Certification links
Links
Authorized user can see question and answers.
Please log in or sign up.

Exam question list:
Show all comments
Sun 310-056: Sun Certified Programmer for J2SE 5.0 Upgrade Exam
#41. Given:
  1. 1. public class Target {
  2. 2. private int i = 0;
  3. 3. public int addOne(){
  4. 4. return ++i;
  5. 5. }
  6. 6. }
and:
  1. 1. public class Client {
  2. 2. public static void main(String[] args){
  3. 3. System.out.println(new Target().addOne());
  4. 4. }
  5. 5. }
Which change can you make to Target without affecting Client?

Show comments for this question (0)
Add comments
Link to this question

#42. Given:
  1. 11. Runnable r = new Punnable() {
  2. 12. public void run()
  3. 13. System.out.print(”Cat”);
  4. 14. }
  5. 15. };
  6. 16. Thread t = new Thread(r) {
  7. 17. public void run() {
  8. 18. System.out.print(”Dog”);
  9. 19. }
  10. 20. };
  11. 21. t.start();
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#43. Given:
  1. 1. public class Threads4 {
  2. 2. public static void main (String[] args) {
  3. 3. new Threads4.go()
  4. 4. }
  5. 5. public void go() {
  6. 6. Runnable r = new Runnable() {
  7. 7. public void run() {
  8. 6. System.out.print(”foo”);
  9. 9. }
  10. 10. };
  11. 11. Thread t = new Thread(r);
  12. 12. t.start();
  13. 13. t.start();
  14. 14. }
  15. 15.}
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#44. Given:
  1. 1. public class TestOne {
  2. 2. public static void main (String[] args) throws Exception {
  3. 3. Thread.sleep(3000);
  4. 4. System .out.println(”sleep”);
  5. 5. }
  6. 6.}
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#45. Given:
  1. 1. public class Threads2 implements Runnable {
  2. 2.
  3. 3. public void run() {
  4. 4. System.out.println(”run. “);
  5. 5. throw new RuntimeException(”Problem”);
  6. 6. }
  7. 7. public static void main(String[] args)
  8. 8. Thread t = new Thread(new Threads2());
  9. 9. t.start();
  10. 10. System.out.println(”End of method.”);
  11. 11. }
  12. 12. }
What two can be results? (Choose two.)

Show comments for this question (0)
Add comments
Link to this question

#46. Click the Exhibit button.
Which statement is true about the two classes?

Show comments for this question (0)
Add comments
Link to this question

#47. Given:
  1. 31. //some code here
  2. 32. try {
  3. 33. // some code here
  4. 34. } catch (SomeException se) {
  5. 35. // some code here
  6. 36. } finally {
  7. 37. // some code here
  8. 38. }
Under which three circumstances will the code on line 37 be executed? (Choose three.)

Show comments for this question (0)
Add comments
Link to this question

#48. Given:
  1. 12. public class Test {
  2. 13. public enum Dogs {collie, harrier);
  3. 14. public static void main(String [] args) {
  4. 15. Dogs myDog = Dogs.collie;
  5. 16. switch (myDog) {
  6. 17. case collie:
  7. 16. System.out.print(”collie “);
  8. 19. case harrier;
  9. 20. System.out.print(“harrier “);
  10. 21. }
  11. 22. }
  12. 23.)
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#49. Given:
  1. 25. int x = 12;
  2. 26.while(x< 10){
  3. 27. X--;
  4. 26.}
  5. 29. System.out.print(x);
What is the result?

Show comments for this question (0)
Add comments
Link to this question

#50. Given:
  1. 10. interface Foo {}
  2. 11. class Alpha implements Foo {}
  3. 12. class Beta extends Alpha {}
  4. 13. class Delta extends Beta {
  5. 14. public static void main( String[] args ) {
  6. 15. Beta x = new Beta();
  7. 16. //insert code here
  8. 17. }
  9. 18.}
Which code, inserted at line 16, will cause ajava.lang.ClassCastException?

Show comments for this question (0)
Add comments
Link to this question


 [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] ... [12 
Up ^ gen. 0.288 Server date 06:27 10-01-2009 Developed by Zip © 2006 Up ^
Forum
Start online exam simulation
Master braindump