单选题byte [] arry1, array2[];  byte array3 [][];  byte[][] array4;   If each array has been initialized, which statement will cause a compiler error?()AArray2 = array1;BArray2 = array3;CArray2 = array4;DBoth A and BEBoth A and CFBoth B and C

题目
单选题
byte [] arry1, array2[];  byte array3 [][];  byte[][] array4;   If each array has been initialized, which statement will cause a compiler error?()
A

 Array2 = array1;

B

 Array2 = array3;

C

 Array2 = array4;

D

 Both A and B

E

 Both A and C

F

 Both B and C


相似考题
更多“单选题byte [] arry1, array2[];  byte array3 [][];  byte[][] array4;   If each array has been initialized, which statement will cause a compiler error?()A  Array2 = array1;B  Array2 = array3;C  Array2 = array4;D  Both A and BE  Both A and CF  Both B and C”相关问题
  • 第1题:

    数据段中有以下定义:

    RRAY1 EOU 16H,

    ARRAY2 DW 16H

    请指出下面两条指令的寻址方式:

    MOV AX,ARRAY1 寻址方式:______。

    MOV AX,ARRAY2 寻址方式:______。


    正确答案:立即寻址方式    直接寻址方式
    立即寻址方式  ,  直接寻址方式

  • 第2题:

    byte[]arry1,array2[];bytearray3[][];byte[][]array4;Ifeacharrayhasbeeninitialized,whichstatementwillcauseacompilererror?()

    A.Array2=array1;

    B.Array2=array3;

    C.Array2=array4;

    D.BothAandB

    E.BothAandC

    F.BothBandC


    参考答案:F

  • 第3题:

    给出下列代码,则数组初始化中哪项是不正确的? byte[] array1,array2 []; byte array3 [] []; byte [][]array4;

    A.array 2= array1

    B.array2=array3

    C.array2=array4

    D.array3=array4


    正确答案:A
    解析:此题考查二维数组的定义,其中array1为一维数组其余为二维数组所A)错误。

  • 第4题:

    给定下面的代码: byte[] array1,array2[]; byte array3[] []; byte [] [] array4; 如果上面的每一个数组都初始化了,以下各项语句中错误的是( )。

    A.array2 =array1

    B.array2=array3

    C.array2=array4

    D.both A and B


    正确答案:A
    解析:本题考查对多维数组的理解。二维数组可以有如下的定义方式。typc arrayName[][];type[][]arrayName;tyPe[]arrayName[];其中的type代表数组元素的类型,可以是简单类型,也可以是复合类型。本题中,除arrayl是一维数组外,别的数组都是二维数组。选项 A不能被编译通过,array1是一维数组,而 array2是二维数组;选项B、C、D都是正确的,可以被编泽通过。故本题答案是A。

  • 第5题:

    给出下面程序的代码: byte[ ] array1, array2[ ]; byte array3[ ][ ]; byter[ ][ ] array4; 下列数组操作语句中不正确的是( )。

    A.array2=array1

    B.array2=array3;

    C.array2=array4

    D.array3=array4


  • 第6题:

    数据段中有以下定义:ARRAY1 EQU 16HARRAY2 DW 16H请指出下面两条指令中源操作数的寻址方式:MOV AX,ARRAY1;寻址方式:()MOV AX,ARRAY2;寻址方式:()


    正确答案:立即寻址;直接寻址

  • 第7题:

    Which statement is true about Kompella-based and Martina-based VPNs?()

    • A、Both use LDP
    • B、Both use BGP
    • C、Both require additional hardware.
    • D、Both use a two-label stack for forwarding.

    正确答案:D

  • 第8题:

    When a BGP router is not capable of understanding 4-byte AS numbers, it will see 4-byte AS numbers as aspecial, reserved, 2-byte AS number in the AS path. Which 2-byte AS number is this reserved one?()

    • A、00000
    • B、12345
    • C、23456
    • D、65000
    • E、99999

    正确答案:C

  • 第9题:

    1. import java.util.*;  2. public class Test {  3. public static void main(String[] args) {  4. List strings = new ArrayList();  5. // insert code here  6. }  7. }  Which four, inserted at line 5, will allow compilation to succeed?()

    • A、 String s = strings.get(0);
    • B、 Iterator i1 = strings.iterator();
    • C、 String[] array1 = strings.toArray();
    • D、 Iterator i2 = strings.iterator();
    • E、 String[] array2 = strings.toArray(new String[1]);
    • F、 Iterator i3 = strings.iterator();

    正确答案:A,B,D,E

  • 第10题:

    单选题
    ATM信元的长度为:()
    A

    47byte;

    B

    48byte;

    C

    53byte;

    D

    54byte


    正确答案: D
    解析: 暂无解析

  • 第11题:

    单选题
    byte [] arry1, array2[];  byte array3 [][];  byte[][] array4;   If each array has been initialized, which statement will cause a compiler error?()
    A

     Array2 = array1;

    B

     Array2 = array3;

    C

     Array2 = array4;

    D

     Both A and B

    E

     Both A and C

    F

     Both B and C


    正确答案: C
    解析: 暂无解析

  • 第12题:

    单选题
    给出下列代码,byte[]array1,array2[];byte[]array3[][];byte[][]array4;则数组初始化中哪项是不正确的()
    A

    array2=array1

    B

    array2=array3

    C

    array2=array4

    D

    array3=array4


    正确答案: D
    解析: 暂无解析

  • 第13题:

    importjava.util.*;2.publicclassTest{3.publicstaticvoidmain(String[]args){4.Liststrings=newArrayList();5.//insertcodehere6.}7.}Whichfour,insertedatline5,willallowcompilationtosucceed?()

    A.Strings=strings.get(0);

    B.Iteratori1=strings.iterator();

    C.String[]array1=strings.toArray();

    D.Iteratori2=strings.iterator();

    E.String[]array2=strings.toArray(newString[1]);

    F.Iteratori3=strings.iterator();


    参考答案:A, B, D, E

  • 第14题:

    bytearry1,array2;bytearray3;bytearray4;Ifeacharrayhasbeeninitialized,whichstatementwillcauseacompilererror?()

    A.Array2=array1;

    B.Array2=array3;

    C.Array2=array4;

    D.BothAandB

    E.BothAandC

    F.BothBandC


    参考答案:F

  • 第15题:

    给出下面程序的代码: byte[] array1, array2[]; byte array3[] []; byte [] [] array4; 下面数组操作语句中______是不正确。

    A.array2=array1;

    B.array2=array3;

    C.array3=array4;

    D.array2=array4;


    正确答案:A
    解析:此题考查二维数组的定义,其中arrayl为一维数组,其余的为二维数组,选项A中,将一维数组的值赋给二维数组,出现错误。

  • 第16题:

    给定下面的代码: byte[] arrayl,array2[]; byte array3[][]; byte [][] array4; 如果上面的每一个数组都初始化了,以下各项语句中错误的是( )。

    A.array2=array1

    B.array2=array3

    C.array2=array4

    D.both A and B


    正确答案:A
    解析:本题考查对多维数组的理解。二维数组可以有如下的定义方式。type arrayName[][];type[][] arrayName;type[] arrayName[];其中的type代表数组元素的类型,可以是简单类型,也可以是复合类型。本题中,除array1是一维数组外,别的数组都是二维数组。选项 A不能被编译通过,array1是一维数组,而 array2是二维数组;选项B、C、D都是正确的,可以被编译通过。故本题答案是A。

  • 第17题:

    针对下面程序段,边界值问题可以定位在______。
    1:Rem Create a 10 element integer array
    2:Rem lnitialize each element to-1
    3:Dim data(10)As Integer
    4:Dim i As Integer
    5:For i=1 TO 10
    6:data(i)=-1
    7:Next i
    8:End

    A.data(1)
    B.data(0)
    C.data(9)
    D.data(10)

    答案:B
    解析:
    试题分析:本题考查用边界值法设计测试用例。边界值法的取值原则是取最小值和最大值,比最小值稍小值和比最大值稍大值,本题给出问题的条件是data(0),没有给data(0)赋值。参考答案:B

  • 第18题:

    byte arry1, array2;   byte array3 ;   byte array4;   If each array has been initialized, which statement will cause a compiler error?()

    • A、 Array2 = array1;
    • B、 Array2 = array3;
    • C、 Array2 = array4;
    • D、 Both A and B
    • E、 Both A and C
    • F、 Both B and C

    正确答案:F

  • 第19题:

    给出下列代码,byte[]array1,array2[];byte[]array3[][];byte[][]array4;则数组初始化中哪项是不正确的()

    • A、array2=array1
    • B、array2=array3
    • C、array2=array4
    • D、array3=array4

    正确答案:C

  • 第20题:

    public class X {  public static void main (String[] args)  {  byte b = 127;  byte c = 126;  byte d = b + c;  }  }   Which statement is true?()  

    • A、 Compilation succeeds and d takes the value 253.
    • B、 Line 5 contains an error that prevents compilation.
    • C、 Line 5 throws an exception indicating “Out of range”
    • D、 Line 3 and 4 contain error that prevent compilation.
    • E、 The compilation succeeds and d takes the value of 1.

    正确答案:B

  • 第21题:

    多选题
    1. import java.util.*;  2. public class Test {  3. public static void main(String[] args) {  4. List strings = new ArrayList();  5. // insert code here  6. }  7. }  Which four, inserted at line 5, will allow compilation to succeed?()
    A

    String s = strings.get(0);

    B

    Iterator i1 = strings.iterator();

    C

    String[] array1 = strings.toArray();

    D

    Iterator i2 = strings.iterator();

    E

    String[] array2 = strings.toArray(new String[1]);

    F

    Iterator i3 = strings.iterator();


    正确答案: C,A
    解析: 暂无解析

  • 第22题:

    单选题
    public class X {   public static void main (String args) {   byte b = 127;   byte c = 126;   byte d = b + c;   }   }   Which statement is true?()
    A

     Compilation succeeds and d takes the value 253.

    B

     Line 5 contains an error that prevents compilation.

    C

     Line 5 throws an exception indicating “Out of range”

    D

     Line 3 and 4 contain error that prevent compilation.

    E

     The compilation succeeds and d takes the value of 1.


    正确答案: D
    解析: 暂无解析

  • 第23题:

    判断题
    在电子表格模型中,函数COVAR(array1,array2)是用来求解两个变量的协方差。
    A

    B


    正确答案:
    解析: 暂无解析

  • 第24题:

    单选题
    When a BGP router is not capable of understanding 4-byte AS numbers, it will see 4-byte AS numbers as aspecial, reserved, 2-byte AS number in the AS path. Which 2-byte AS number is this reserved one?()
    A

    00000

    B

    12345

    C

    23456

    D

    65000

    E

    99999


    正确答案: B
    解析: 暂无解析