[OCAJP] 多态与覆写 2
What is the result? A. Base DerivedA B. Base DerivedB C. DerivedB DerivedB D. DerivedB DerivedA E. A classcast Except ion is thrown at runtime.
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
分类
科学与科技类文章的总分类,包含编程与算法、操作系统、网络与服务器、网站与软硬件的介绍,以及数学逻辑、天文物理和生物化学的科普文章。
共 1507 篇文章
What is the result? A. Base DerivedA B. Base DerivedB C. DerivedB DerivedB D. DerivedB DerivedA E. A classcast Except ion is thrown at runtime.
You are asked to develop a program for a shopping application, and you are given the following information. Which definition of the Toy class adds a valid layer of abstraction to the class hierarchy?
Which three statements describe the object-oriented features of the Java language? A. Objects cannot be reused. B. A subclass can inherit from a superclass. C. Objects can share behaviors with other ...
Which two modifications should you make so that the code compiles successfully?
What is the result? A. Element 0 Element 1 B. Null element 0 Null element 1 C. Null Null D. A NullPointerException is thrown at runtime.
Which of the following data types will allow the following code snippet to compile? A. long B. double C. int D. float E. byte
What would be the output, if it is executed as a program? A. name =, pass = B. name = null, pass = null C. name = null, pass = false D. name = null pass = true E. Compile error.
* AssertionError * ArithmeticException * ArrayIndexOutofBoundsException * FileNotFoundException * IllegalArgumentException * IOError * IOException * NumberFormatException * SQLException Which option ...
What is the result? A. A B C Work done B. A B C D Work done C. A Work done D. Compilation fails
What is the result? A. ii = 1 ii = 2 B. Compilation fails C. The program prints nothing D. The program goes into an infinite loop with no output E. The program goes to an infinite loop outputting: ii...