[OCAJP][OCPJP] 撰写方法
What is the proper way to defined a method that take two int values and returns their sum as an int value? A. int sum(int first, int second) { first + second; } B. int sum(int first, second) { return...
MagicLen · https://magiclen.org
本站也提供繁體中文版。切換到繁體中文版
标签
Oracle Certified Professional Java SE Programmer (OCPJP).
共 128 篇文章
What is the proper way to defined a method that take two int values and returns their sum as an int value? A. int sum(int first, int second) { first + second; } B. int sum(int first, second) { return...
What is the result? A. Super Sub Sub B. Contract Contract Super C. Compilation fails at line n1 D. Compilation fails at line n2
Which change enables the code to print the following? James age: 20 Williams age: 32
What is the result? A. box B. nbo C. bo D. nb E. An exception is thrown at runtime
What is the result? A. sc: class Object asc: class AnotherSampleClass B. sc: class SampleClass asc: class AnotherSampleClass C. sc: class AnotherSampleClass asc: class SampleClass D. sc: class Anothe...
What is the result? A. 100 210 B. Compilation fails due to an error in line n1 C. Compilation fails due to an error at line n2 D. Compilation fails due to an error at line n3
A method is declared to take three arguments. A program calls this method and passes only two arguments. What is the results? A. Compilation fails. B. The third argument is given the value null. C. T...
Which code fragment prints blue, cyan, ?
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. 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!