Given: 11. public static void main(String[] args) { 12. Object obj = new int[] { 1, 2, 3 }; 13. int[] someArray = (int[])obj; 14. for (int i : someArray) System.out.print(i + " "); 15. } What is the result? ()
相似题目
-
11. public static void main(String[] args) { 12. Object obj = new Object() { 13. public int hashCode() { 14. returns 42; 15. } 16. }; 17. System.out.println(obj.hashCode()); 18. } What is the result? ()
-
Given:10. interface Data { public void load(); }11. abstract class Info { public abstract void load(); }Which class correctly uses the Data interface and Info class?()()
-
Given: 10.interface Data { public void load(); } 11.abstract class Info { public abstract void load(); } Which class correctly uses the Data interface and Info class?()
-
Given: 10.public void service(ServletRequest request, 11.ServletResponse response) { 12.ServletInputStream sis = 13.// insert code here 14.} Which retrieves the binary input stream on line 13?()
-
1. public class X { 2. public static void main (String[]args) { 3. int [] a = new int [1] 4. modify(a); 5. System.out.printIn(a[0]); 6. } 7. 8. public static void modify (int[] a) { 9. a[0] ++; 10. } 11. } What is the result?()
-
Given: package com.sun.scjp; public class Geodetics { public static final double DIAMETER = 12756.32; //kilometers } Which two correctly access the DIAMETER member of the Geodetics class?() https://assets.asklib.com/images/image2/2018080114194111528.jpg
-
Given: 11. public void go(int x) { https://assets.asklib.com/images/image2/2018080117015876420.jpg Which statement is true?()
-
Given the following class, which statements can be inserted at position 1 without causing the code to fail compilation?() public class Q6db8 { int a; int b = 0; static int c; public void m() { int d; int e = 0; // Position 1 } }
-
Given the following code: public class Person{ int arr[] = new int[10]; public static void main(String a[]) { System.out.println(arr[1]); } } Which statement is correct?()
-
10. public class Bar { 11.static void foo(int...x) { 12. // insert code here 13. } 14. } Which two code fragments, inserted independently at line 12, will allow the class to compile?()
-
Given 11.public interface Status { 12./* insert code here */ int MY_VALUE = 10; 13.} Which three are valid on line 12?()
-
Given the following code: public class Person{ static int arr[] = new int[10]; public static void main(String a[]) { System.out.println(arr[1];) } } Which statement is correct?()
-
11. public static void append(List list) { list.add(”0042”); } 12. public static void main(String[] args) { 13. List intList = new ArrayList(); 14. append(intList); 15. System.out.println(intList.get(0)); 16. } What is the result?()
-
11.public static void main(String[]args){ 12.Object obj=new int[]{1,2,3}; 13.int[] someArray=(int[])obj; 14.for(inti:someArray)System.out.print(i+"") 15.} What is the result?()
-
11. public static void main(String[] args) { 12. Object obj =new int[] { 1,2,3 }; 13. int[] someArray = (int[])obj; 14. for (int i: someArray) System.out.print(i +“ “) 15. } What is the result? ()
-
public class Test { public static void main(String [] args) { boolean assert = true; if(assert) { System.out.println(”assert is true”); } } } Given: javac -source 1.3 Test.java What is the result?()
-
10. class Line { 11. public static class Point { } 12. } 13. 14. class Triangle { 15. // insert code here 16. } Which code, inserted at line 15, creates an instance of the Point class defined in Line?()
-
1. public class Boxer1 { 2. Integer i; 3. int x; 4. public Boxer1(int y) { 5. x=i+y; 6. System.out.println(x); 7. } 8. public static void main(String[] args) { 9. new Boxer1(new Integer(4)); 10. } 11. } What is the result?()
-
Given 1. public class Foo { 2. public static void main (String [] args) } 3. try { return;} 4. finally { Syste.out.printIn (“Finally”);} 5. } 6. } What is the result()?
-
1. public class test ( 2. public static void main(string args[]) { 3. int 1= 0; 4. while (i) { 5. if (i==4) { 6. break; 7. } 8. ++i; 9. } 10. 11. } 12. ) What is the value of i at line 10?()
-
Given: 310-025 Leading the way in IT testing and certification tools, www.testking.com - 48 - public class foo { static String s; public static void main (Stringargs) { system.out.printIn (“s=” + s); } } What is the result?()
-
以下代码的调试结果为?1: public class Q102: {3: public static void main(String[] args)4: {5: int i = 10;6: int j = 10;7: boolean b = false;8:9: if( b = i == j)10: System.out.println(\True\);11: else12: System.out.println(\False\);13: }14: }
-
Given: public class Test { public static void main (); } } What is the result?
-
Given a class Repetition:1.package utils;2.3.public class Repetition{4.public static String twice(Strings){returns+s;}5.}and given another class Demo:1.//insert code here2.3.public class Demo{4.public static void main(String[]args){5.System.out.println(twice("pizza"));6.}7.}Which code should be inserted at line 1 of Demo.java to compile and run Demo to printpizzapizza”?()
推荐题目
- 李亚华主任在全省农信社深耕园区深耕商区工作现场会上的讲话指出,要加大园区和商区的拓展力度,原因包括()
- 1MPa的压力约等于()水柱产生的压力。
- 新传感器换好后,首先要做的是().
- 立法工作的核心阶段是()。
- 按照2013版《建设工程施工合同文本》通用条款规定,隐蔽工程经验收达到工程质量标准规范和设计图纸等要求,但监理工程师验收后不在验收记录上签字,在()情况下,施工单位可以继续进行隐蔽。
- 在钢锭各个结晶带中的不均匀现象叫()偏析。
- 使用气相色谱进行分析时,对于卤代烃、硝基化合物等电子亲和能力较强的物质,最适合的检测器为()
- 房地产开发企业应当对其开发建设的房地产开发项目的质量承担责任()
- 下列不属于工程造价咨询业务范围的是()。
- 第97题:()的作用主要是分隔坝段,安放溢流管道,支承枕式坝两端堵头。