单选题What will be written to the standard output when the following program is run?()   public class Q63e3 {   public static void main(String args[]) {   System.out.println(9 ^ 2);   }   }A 81B 7C 11D 0E false

题目
单选题
What will be written to the standard output when the following program is run?()   public class Q63e3 {   public static void main(String args[]) {   System.out.println(9 ^ 2);   }   }
A

81

B

7

C

11

D

0

E

false


相似考题
更多“单选题What will be written to the standard output when the following program is run?()   public class Q63e3 {   public static void main(String args[]) {   System.out.println(9 ^ 2);   }   }A 81B 7C 11D 0E false”相关问题
  • 第1题:

    What will be written to the standard output when the following program is run?()   public class Q63e3 {   public static void main(String args[]) {   System.out.println(9 ^ 2);   }   }  

    • A、81
    • B、7
    • C、11
    • D、0
    • E、false

    正确答案:C

  • 第2题:

    Public class test (  Public static void main (String args[])  (  System.out.printIn (6 ^ 3);  )  )   What is the output?()


    正确答案:5

  • 第3题:

    What will be written to the standard output when the following program is run?()  public class Qd803 {   public static void main(String args[]) {   String word = "restructure";   System.out.println(word.substring(2, 3));   }   }  

    • A、est
    • B、es
    • C、str
    • D、st
    • E、s

    正确答案:E

  • 第4题:

    What will be written to the standard output when the following program is run?()   public class Q8499 {   public static void main(String args[]) {  double d = -2.9;   int i = (int) d;  i *= (int) Math.ceil(d);  i *= (int) Math.abs(d);   System.out.println(i);   }   }

    • A、12
    • B、18
    • C、8
    • D、9
    • E、27

    正确答案:C

  • 第5题:

    What will be written to the standard output when the following program is run?()   class Base {  int i;  Base() {   add(1);   }   void add(int v) {  i += v;  }   void print() {  System.out.println(i);  }   }   class Extension extends Base {  Extension() {  add(2);  }   void add(int v) {  i += v*2;  }  }   public class Qd073 {   public static void main(String args[]) {  bogo(new Extension());  }   static void bogo(Base b) {  b.add(8);  b.print();   }   }  

    • A、9
    • B、18
    • C、20
    • D、21
    • E、22

    正确答案:E

  • 第6题:

    Public class test (  Public static void stringReplace (String text)  (  Text = text.replace (‘j’ , ‘i’);  )  public static void bufferReplace (StringBuffer text)  (  text = text.append (“C”)  )   public static void main (String args[]}  (  String textString = new String (“java”); StringBuffer text BufferString = new StringBuffer (“java”);  stringReplace (textString);  bufferReplace (textBuffer);  System.out.printLn (textString + textBuffer);  ) )  What is the output?()


    正确答案:javajavaC

  • 第7题:

    单选题
    class MyThread extends Thread {  public void run() { System.out.println(“AAA”); }  public void run(Runnable r) { System.out.println(“BBB”); }  public static void main(String[] args) {  new Thread(new MyThread()).start();  }  }   What is the result?()
    A

     AAA

    B

     BBB

    C

     Compilation fails.

    D

     The code runs with no output.


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

  • 第8题:

    单选题
    What will be the result of attempting to compile and run the following code?()   public class Q6b0c {   public static void main(String args[]) {  int i = 4;  float f = 4.3;   double d = 1.8;   int c = 0;   if (i == f) c++;   if (((int) (f + d)) == ((int) f + (int) d))  c += 2;   System.out.println(c);   }   }
    A

    The code will fail to compile.

    B

    0 will be written to the standard output.

    C

    1 will be written to the standard output.

    D

    2 will be written to the standard output.

    E

    3 will be written to the standard output.


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

  • 第9题:

    单选题
    What will be written to the standard output when the following program is run?()   public class Q8499 {   public static void main(String args[]) {  double d = -2.9;   int i = (int) d;  i *= (int) Math.ceil(d);  i *= (int) Math.abs(d);   System.out.println(i);   }   }
    A

    12

    B

    18

    C

    8

    D

    9

    E

    27


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

  • 第10题:

    单选题
    What will be the result of attempting to compile and run the following program?()   public class Q28fd {   public static void main(String args[]) {   int counter = 0;   l1:   for (int i=10; i i) break l2;   if (i == j) {   counter++;   continue l1;   }   }   counter--;   }   System.out.println(counter);  }   }
    A

    The program will fail to compile.

    B

    The program will not terminate normally.

    C

    The program will write 10 to the standard output.

    D

    The program will write 0 to the standard output.

    E

    The program will write 9 to the standard output.


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

  • 第11题:

    单选题
    What will be written to the standard output when the following program is run?()   class Base {  int i;  Base() {   add(1);   }   void add(int v) {  i += v;  }   void print() {  System.out.println(i);  }   }   class Extension extends Base {  Extension() {  add(2);  }   void add(int v) {  i += v*2;  }  }   public class Qd073 {   public static void main(String args[]) {  bogo(new Extension());  }   static void bogo(Base b) {  b.add(8);  b.print();   }   }
    A

    9

    B

    18

    C

    20

    D

    21

    E

    22


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

  • 第12题:

    单选题
    What will be written to the standard output when the following program is run?()   public class Qcb90 {   int a;   int b;   public void f() {  a = 0;   b = 0;   int[] c = { 0 };   g(b, c);   System.out.println(a + " " + b + " " + c[0] + " ");   }   public void g(int b, int[] c) {   a = 1;  b = 1;  c[0] = 1;  }   public static void main(String args[]) {   Qcb90 obj = new Qcb90();   obj.f();   }   }
    A

    0 0 0

    B

    0 0 1

    C

    0 1 0

    D

    1 0 0

    E

    1 0 1


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

  • 第13题:

    Which declarations will allow a class to be started as a standalone program?()  

    • A、public void main(String args[])
    • B、public void static main(String args[])
    • C、public static main(String[] argv)
    • D、final public static void main(String [] array)
    • E、public static void main(String args[])

    正确答案:D,E

  • 第14题:

    What will be the result of attempting to compile and run the following code?()   public class Q6b0c {   public static void main(String args[]) {  int i = 4;  float f = 4.3;   double d = 1.8;   int c = 0;   if (i == f) c++;   if (((int) (f + d)) == ((int) f + (int) d))  c += 2;   System.out.println(c);   }   }  

    • A、The code will fail to compile.
    • B、0 will be written to the standard output.
    • C、1 will be written to the standard output.
    • D、2 will be written to the standard output.
    • E、3 will be written to the standard output.

    正确答案:A

  • 第15题:

    public class Test {  public static void main(String[] args) {  String str = NULL;  System.out.println(str);  }  }   What is the result?()  

    • A、 NULL
    • B、 Compilation fails.
    • C、 The code runs with no output.
    • D、 An exception is thrown at runtime.

    正确答案:B

  • 第16题:

    What will be written to the standard output when the following program is run?()   public class Q03e4 {   public static void main(String args[]) {   String space = " ";   String composite = space + "hello" + space + space;   composite.concat("world");   String trimmed = composite.trim();   System.out.println(trimmed.length());   }   }  

    • A、5
    • B、6
    • C、7
    • D、12
    • E、13

    正确答案:A

  • 第17题:

    What will be the result of attempting to compile and run the following program?()   public class Q28fd {   public static void main(String args[]) {   int counter = 0;   l1:   for (int i=10; i<0; i--) {   l2:  int j = 0;   while (j < 10) {   if (j > i) break l2;   if (i == j) {   counter++;   continue l1;   }   }   counter--;   }   System.out.println(counter);  }   }   

    • A、The program will fail to compile.
    • B、The program will not terminate normally.
    • C、The program will write 10 to the standard output.
    • D、The program will write 0 to the standard output.
    • E、The program will write 9 to the standard output.

    正确答案:A

  • 第18题:

    What will be written to the standard output when the following program is run?()   public class Qcb90 {   int a;   int b;   public void f() {  a = 0;   b = 0;   int[] c = { 0 };   g(b, c);   System.out.println(a + " " + b + " " + c[0] + " ");   }   public void g(int b, int[] c) {   a = 1;  b = 1;  c[0] = 1;  }   public static void main(String args[]) {   Qcb90 obj = new Qcb90();   obj.f();   }   }  

    • A、0 0 0
    • B、0 0 1
    • C、0 1 0
    • D、1 0 0
    • E、1 0 1

    正确答案:E

  • 第19题:

    填空题
    Public class test (  Public static void stringReplace (String text)  (  Text = text.replace (‘j’ , ‘i’);  )  public static void bufferReplace (StringBuffer text)  (  text = text.append (“C”)  )   public static void main (String args[]}  (  String textString = new String (“java”);  StringBuffer text BufferString = new StringBuffer (“java”);  stringReplace (textString);  BufferReplace (textBuffer);  System.out.printLn (textString + textBuffer);  )  )   What is the output?()

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

  • 第20题:

    单选题
    What will be the result of attempting to run the following program?()   public class Qaa75 {   public static void main(String args[]) {   String[][][] arr = {   { {}, null },   { { "1", "2" }, { "1", null, "3" } },   {},   { { "1", null } }  };   System.out.println(arr.length + arr[1][2].length);   }   }
    A

    The program will terminate with an ArrayIndexOutOfBoundsException.

    B

    The program will terminate with a NullPointerException.

    C

    4 will be written to standard output.

    D

    6 will be written to standard output.

    E

    7 will be written to standard output.


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

  • 第21题:

    单选题
    What will be written to the standard output when the following program is run?()  public class Qd803 {   public static void main(String args[]) {   String word = "restructure";   System.out.println(word.substring(2, 3));   }   }
    A

    est

    B

    es

    C

    str

    D

    st

    E

    s


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

  • 第22题:

    填空题
    Public class test (  Public static void main (String args[])  (  System.out.printIn (6 ^ 3);  )  )   What is the output?()

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

  • 第23题:

    单选题
    What will be written to the standard output when the following program is run?()   public class Q63e3 {   public static void main(String args[]) {   System.out.println(9 ^ 2);   }   }
    A

    81

    B

    7

    C

    11

    D

    0

    E

    false


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

  • 第24题:

    单选题
    What will be written to the standard output when the following program is run?()   public class Q03e4 {   public static void main(String args[]) {   String space = " ";   String composite = space + "hello" + space + space;   composite.concat("world");   String trimmed = composite.trim();   System.out.println(trimmed.length());   }   }
    A

    5

    B

    6

    C

    7

    D

    12

    E

    13


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