单项选择题
以下哪个是适当的hashCode定义方法?()
A. return super.hashCode(); B. return name.hashCode() + age * 7; C. return name.hashCode() + comment.hashCode() /2; D. return name.hashCode() + comment.hashCode() / 2 - age * 3;
下面代码的运行结果是什么?()A. 0B. 1C. 2D. 3E. 4F. 编译错误G. 运行时抛出异常
下面代码的运行结果是什么?()
A. 0 B. 1 C. 2 D. 3 E. 4 F. 编译错误 G. 运行时抛出异常
下面代码的运行结果是什么?()A. 42B. 0042C. An exception is thrown at...
A. 42 B. 0042 C. An exception is thrown at runtime. D. Compilation fails because of an error in line 13. E. Compilation fails because of an error in line 14.
int[] myArray = new int[] {1,2,3,4,5}; 以下哪个选项可以用一个数组创建...
int[] myArray = new int[] {1,2,3,4,5}; 以下哪个选项可以用一个数组创建一个列表?()
A. List myList = myArray.asList(); B. List myList = Arrays.asList(myArray); C. List myList = new ArrayList(myArray); D. List myList = Collections.fromArray(myArray);