[OCAJP] 封裝 2
Which two options, when inserted independently inside class Base, ensure that the class is being properly encapsulated and allow the program to execute and print the square of the number?
MagicLen · https://magiclen.org
本站也提供简体中文版。切换到简体中文版
標籤
1z0-808 是取得 Oracle Certified Associate Java SE 8 Programmer 認證的考試代號。
共 229 篇文章
Which two options, when inserted independently inside class Base, ensure that the class is being properly encapsulated and allow the program to execute and print the square of the number?
What is the result? A. One B. Two C. Three D. Compilation fails.
What is the result? A. simaple A B. Capital A C. simaple A default Capital A D. simaple A default E. Compilation fails.
Which three lines, when inserted independently at line n1, cause the program to print a 0 balance? A. this.amount = 0; B. amount = 0; C. acct(0); D. acct.amount = 0; E. acct.getAmount() = 0; F. acct....
Which code fragment, when inserted at line //insert code here, enables the code to print COJ?
What is the result? A. 2 4 B. 0 2 4 6 C. 0 2 4 D. Compilation fails
What is the result? A. null B. Compilation fails C. An exception is thrown at runtime D. 0
What is the result? A. Caught java.lang.RuntimeException: Exception Exception in thread "main" java.lang.Error: Error at TestApp.doList(TestApp.java: 14) at TestApp.main(TestApp.java: 6) B. E...
Which of the following will print current time? A. System.out.print(new LocalTime().now()); B. System.out.print(new LocalTime()); C. System.out.print(LocalTime.now()); D. System.out.print(LocalTime.t...
What is the result? A. Success B. Failure C. Compilation fails. D. An exception is thrown at runtime