[OCAJP] 陣列
What is the result? A. 12 B. Invalid Index 12 C. Invalid Index D. Compilation fails
MagicLen · https://magiclen.org
本站也提供简体中文版。切换到简体中文版
分類
程式設計的教學與經驗分享,涵蓋 Rust、Java、JavaScript、Go、C/C++ 等程式語言的入門教學、範例程式與實務技巧,以及演算法、App 開發與開發工具的用法。
共 635 篇文章
What is the result? A. 12 B. Invalid Index 12 C. Invalid Index D. Compilation fails
What is printed out when the program is excuted? A. one B. two C. three D. four
Which set of commands prints Hello Duke in the console? A. javac Greeting java Greeting Duke B. javac Greeting.java Duke java Greeting C. javac Greeting.java java Greeting Duke D. javac Greeting.java...
What is the result? A. class java.lang.String class java.lang.String class java.util.ArrayList B. class java.lang.Object class java.lang. Object class java.util.Collection C. class java.lang.StringBu...
Which two statements are true for a two-dimensional array of primitive data type? A. It cannot contain elements of different types. B. The length of each dimension must be the same. C. At the declara...
Which three code fragments, when replaced individually for foo, enables the program to compile? A. int i : array B. int i = 0; i < 1; C. ; ; D. ; i < 1; i++ E. i = 0; i<1;
What is the result? A. square ... B. circle ... C. square circle ... D. Compilation fails.
What is the result? A. Result = 2 B. Result = 3 C. Result = 28 D. Result = 29 E. Result = 30
What will be the output? A. SpecialException: Thrown at end of doSomething() method B. Error in thread "main" java.lang.ArrayIndexOutOfBoundsError C. Exception in thread "main" java.lang.ArrayIndexOu...
What is the result? A. Unix Linux Solaris B. null Unix Linux Solaris C. Class java.lang.Exception D. Class java.lang.NullPointerException