[OCAJP][OCPJP] 字串取代
What is the result? A. message = Hi everyone! B. message = Hi XvXryonX! C. A compile time error is produced. D. A runtime error is produced. E. message = F. message = Hi Xveryone!
MagicLen · https://magiclen.org
本站也提供简体中文版。切换到简体中文版
分類
MagicLen 的主要文章,分成「科學與科技」和「社會與生活」兩大類。前者以程式設計、作業系統、網路與軟硬體的教學和心得為主,後者包含語言學習、創作、旅遊、開箱與各種生活主題,另外還有本站公告。
共 1660 篇文章
What is the result? A. message = Hi everyone! B. message = Hi XvXryonX! C. A compile time error is produced. D. A runtime error is produced. E. message = F. message = Hi Xveryone!
What is the result? A. 400 200 B. 200 200 C. 400 400 D. Compilation fails.
Which code fragment, when inserted at line 7, enables the code print true? A. while(key == myarray[index++]){ isFound = true; } B. while(index <= 4){ if(key == myarray[index]){ index+...
Which three statements are benefits of encapsulation? A. Allows a class implementation to change without changing the clients B. Protects confidential data from leaking out of the objects C. Prevents...
What is the result? A. 10 8 6 4 2 0 B. 10 8 6 4 2 C. AnArithmeticException is thrown at runtime D. The program goes into an infinite loop outputting: 10 8 6 4 2 0. . . E. Compilation fails
What is the result? A. The program prints nothing B. d C. A StringIndexOutOfBoundsException is thrown at runtime. D. An ArrayIndexOutOfBoundsException is thrown at runtime. E. A NullPointerException ...
What is the output? A. 2015-03-27 B. 2015-04-27 C. 2015-02-27 D. Compilation fails due to error at line 6. E. Compilation fails due to error at line 8.
What is the result? A. 20 B. 25 C. 29 D. Compilation fails E. An ArrayIndexOutOfBoundsException is thrown at runtime
What is the result? A. Base 30 B. Overridden 20 C. Overridden 20 Base 30 D. Base 30 Overridden 20
Which three statements are true about the structure of a Java class? A. A class can have only one private constructor. B. A method can have the same name as a field. C. A class can have overloaded st...