[OCAJP] 多态与覆写 3
What is the result? A. Shining Sun Shining Sun Shining Sun B. Shining Sun Twinkling Star Shining Sun C. Compilation fails D. A ClassCastException is thrown at runtime
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
科学与科技类文章的总分类,包含编程与算法、操作系统、网络与服务器、网站与软硬件的介绍,以及数学逻辑、天文物理和生物化学的科普文章。
共 1507 篇文章
What is the result? A. Shining Sun Shining Sun Shining Sun B. Shining Sun Twinkling Star Shining Sun C. Compilation fails D. A ClassCastException is thrown at runtime
What is the result? A. Pass B. Fail C. Class MarketOutOfBoundsException D. Class IndexOutOfBoundsException E. Class Exception
Which code fragment, when inserted at line 2, enables the code to compile? A. import sales.*; B. import java.sales.products.*; C. import sales; import sales.products; D. import sales.*; import produc...
Which two are valid array declaration? A. Object array[]; B. Boolean array[3]; C. int[] array; D. Float[2] array;
What is the result? A. Sum is 600 B. Compilation fails at line n1. C. Compilation fails at line n2. D. A ClassCastException is thrown at line n1. E. A ClassCastException is thrown at line n2.
Which two options fail to compile when placed at line n1 of the main method? A. employee.salary = 50_000; B. director.salary = 80_000; C. employee.budget = 200_000; D. manager.budget = 1_000_000; E. ...
Which code fragment should you use at line n1 to instantiate the dvd object successfully? A. super.r = r; this.c = c; B. super(r); this(c); C. super(r); this.c = c; D. this.c = r; super(c);
What is the output? A. [21, 13, 11] B. [30] C. [] D. Compilation fails due to error at line 7 E. Compilation tails due to error at line 10
What is the result? A. 11, 21, 31, 11, 21, 31 B. 11, 21, 31, 12, 22, 32 C. 12, 22, 32, 12, 22, 32 D. 10, 20, 30, 10, 20, 30
What is the result? A. int sum is 30 float sum is 30.0 B. int sum is 30 double sum is 30.0 C. Integer sum is 30 double sum is 30.0 D. Integer sum is 30 float sum is 30.0