首页 > TAG信息列表 > ocjp

ocjp 考试题之十

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811QUESTION 230 Given:10. class One {11. public One foo() { return this; }12. }13. class Two extends One {14. public One foo() { return this; }15. }16. class Three extends Two {17. // insert meth

OCJP 考试题之九

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811QUESTION 177 Given:1.     class TestException extends Exception { }2.     class A {3.     public String sayHello(String name) throws TestException {4.     if(name == null) throw ne

OCJP 考试题之八

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811QUESTION 139Giventhe following directory structure: bigProject |--source | |--Utils.java ||--classes |-- And the following command line invocation: javac -d classessource/Utils.java Assume the current

OCJP 考试题之七

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811QUESTION 150Click the Exhibit button. Given: ClassA a = new ClassA(); a.methodA(); What is the result? A. Compilation fails.B. ClassC is displayed.C. The code runs with no output.D. An exception is th

ocjp 考试题之六

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811QUESTION 134Given: 11. class Snoochy { 12. Boochy booch; 13. public Snoochy() { booch = new Boochy(this); } 14. } 15. 16. class Boochy { 17. Snoochy snooch; 18. public Boochy(Snoochy s) { snooc

ocjp 考试题之五

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811 QUESTION 102 Given:23. Object [] myObjects = {24. new Integer(12),25. new String("foo"),26. new Integer(5),27. new Boolean(true)28. };29. Arrays.sort(myObjects);30. for(int i=0;i<myObjects

ocjp 考试题之四

OCJP视频课堂,具体讲解:https://edu.csdn.net/course/detail/7811QUESTION 73 Given:10: public class Hello {11: String title;12: int value;13: public Hello() {14: title += " World";15: }16: public Hello(int value) {17: this.value = value;18: title = "He

ocjp考试题之三

Given:11. public class Test {12. public static void main(String [] args) {13. int x = 5;14. boolean b1 = true;15. boolean b2 = false;16.17. if ((x == 4) && !b2 )18. System.out.print("1 ");19. System.out.print("2 ");20. if ((b2