[OCAJP] 三角形面积
What is the result? A. Area is 6.0 B. Area is 3.0 C. Compilation fails at line n1. D. Compilation fails at line n2.
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
Java 编程语言的教学与范例,包含语法观念、算法实作与桌面程序开发,并收录大量 Java 认证考试(OCAJP、OCPJP)的题目解析。
共 403 篇文章
What is the result? A. Area is 6.0 B. Area is 3.0 C. Compilation fails at line n1. D. Compilation fails at line n2.
Which code fragment prints blue, cyan, ?
What is the result? A. true true B. true false C. false true D. false false E. Compilation fails
What is the result if the integer aVar is 9? A. 10 Hello World! B. Hello Universe! C. Hello World! D. Compilation fails.
What should statement1, statement2, and statement3, be respectively, in order to produce the result? Shape: constructor Square: foo Shape: foo
Which statement is true? A. This method is invalid. B. This method can be used only in an interface. C. This method can return anything. D. This method can be used only in an interface or an abstract...
Which three are valid? A. Pet a = new Dog(); B. Pet b = new Pet(); C. Dog f = new Pet(); D. Dog d = new Beagle(); E. Pet e = new Beagle(); F. Beagle c = new Dog();
Which code fragment must be inserted at line 6 to enable the code to compile? A. DBConfiguration f; return f; B. return DBConfiguration; C. return new DBConfiguration(); D. retutn 0;
What is the result? A. Number us : 12345 B. A NullPointerException is thrown at runtime C. A NumberFormatException is thrown at runtime D. An ArrayIndexOutOfBoundException is thrown at runtime.
What is the result? A. 2 4 6 8 10 12 B. 2 4 6 8 10 12 14 C. Compilation fails D. The program prints multiple of 2 infinite times E. The program prints nothing