• 2022-06-16
    阅读下面一段代码,代码的输出结果是() Integer in1 = new Integer(10); Integer in2 = new Integer(10); Integer in3 = 10; Integer in4 = 10; System.out.print(in1 == in2); System.out.print(in1 == in3); System.out.print(in3 == in4);
    A: truetruetrue
    B: falsefalsetrue
    C: falsefalsefalse
    D: falsetruefalse
  • B

    举一反三

    内容

    • 0

      下列程序段的执行结果为 _______。 Dim a(3, 5) As Integer Dim i As Integer, j As Integer For i = 1 To 3 For j = 1 To 5 a(i, j) = a(i - 1, j - 1) + (i - 1) * 5 + j Next j Next i Print a(3, 4)

    • 1

      运行以下程序,单击命令按钮后,如果用户从键盘上输入1、2、3、4、5、6,则窗体上输出内容为_________。 Private Sub Command1_Click() Dim a() As Integer Dim i As Integer, j As Integer ReDim a(6) For i = 5 To 10 a(10- i + 1) = InputBox("input number") Next i ReDim Preserve a(10) a(10) = a(3) + a(5) Print a(10) End Sub

    • 2

      有如下函数过程: Function secproc(x As Integer, y As Integer, z As Integer) secproc = 3 * y + z + 2 * x End Function Private Sub Command1_Click() Dim a As Integer, b As Integer, c As Integer a = 2: b = 3: c = 4 Print secproc(c, b, a) End Sub 该程序的运行结果是( )。

    • 3

      用整数10创建一个Integer类的对象,下列各语句中能完成此功能的是( )。 A: Integer i=new Integer(10); B: Integer i=10; C: int i=10; D: Integer i=Integer(10);

    • 4

      下列程序段的运行结果是( )。 Dim A As Integer , B As Integer A = 15 B = 4 Print 4 + A B