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

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


相关考题:

public class Test {   public static void main (String args) {  string foo = “blue”;  string bar = foo;   foo = “green”;   System.out.printIn(bar);   }   }   What is the result?()  A、 An exception is thrown.B、 The code will not compile.C、 The program prints “null”D、 The program prints “blue”E、 The program prints “green”

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[])

public class Test {   public static void main (Stringargs) {   String foo = args[1];   String bar = args;   String baz = args;   System.out.printIn(“baz = ” + baz);  }   }   And the output:  Baz = 2   Which command line invocation will produce the output?()A、 Java Test 2222B、 Java Test 1 2 3 4C、 Java Test 4 2 4 2D、 Java Test 4 3 2 1

下列有关main()方法的签名正确的是哪些?()A、 public static void main(String[] args){}B、 public static void main(){}C、 public static void main(String args[]){}D、 public void static main(String[] args){}

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、estB、esC、strD、stE、s

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.printIn (textString + textBuffer);    }   )   What is the output?()

public class Test {  public static void main(String[] args) {  String str = NULL;  System.out.println(str);  }  }   What is the result?()  A、 NULLB、 Compilation fails.C、 The code runs with no output.D、 An exception is thrown at runtime.

public class Test {  public static void main( String[] args) {  String foo = args[1];  String bar = args[2];  String baz = args[3];  System.out.println(“baz = “ + baz); }  }   And the command line invocation: java Test red green blue   What is the result?()  A、 baz =B、 baz = nullC、 baz = blueD、 Compilation fails.E、 An exception is thrown at runtime.

public class Test {  public static void leftshift(int i, int j) {  i=j;  }  public static void main(String args[])  {  int i = 4, j = 2;  leftshift(i, j);   System.out.printIn(i); }  }     What is the result?()  A、 2B、 4C、 8D、 16E、 The code will not compile.

public class Test {  public static void main (String[]args) {  String foo = args[1];  String bar = args[2];  String baz = args[3];  System.out.printIn(“baz = ” + baz);  }  }  And the output:  Baz = 2  Which command line invocation will produce the output?()  A、 Java Test 2222B、 Java Test 1 2 3 4C、 Java Test 4 2 4 2D、 Java Test 4 3 2 1

public class test(    public int aMethod()[   static int i=0;   i++;   return I;   )    public static void main (String args){   test test = new test();    test.aMethod();   int j = test.aMethod();   System.out.printIn(j);   ]  }   What is the result?()A、 Compilation will fail.B、 Compilation will succeed and the program will print “0”C、 Compilation will succeed and the program will print “1”D、 Compilation will succeed and the program will print “2”

public class X {   public static void main (String[]args)   {   string s = new string (“Hello”);   modify(s);   System.out.printIn(s);   }   public static void modify (String s)  {   s += “world!”;      }   }      What is the result?()    A、 The program runs and prints “Hello”B、 An error causes compilation to fail.C、 The program runs and prints “Hello world!”D、 The program runs but aborts with an exception.

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?()

public class Test {  public static void replaceJ(string text)  {  text.replace (‘j’, ‘l’);  }  public static void main(String args[])  {  string text = new String (“java”)  replaceJ(text);  system.out.printIn(text);  }  }      What is the result?()  A、 The program prints “lava”B、 The program prints “java”C、 An error at line 7 causes compilation to fail.D、 Compilation succeeds but the program throws an exception.

public class IfTest (  public static void main(string[]args) {  int x = 3;  int y = 1;  if (x = y)  system.out.printIn(“Not equal”);  else  system.out.printIn(“Equal”);  }  )   What is the result?()      A、 The output is “Equal”B、 The output in “Not Equal”C、 An error at line 5 causes compilation to fall.D、 The program executes but does not print a message.

public class Test {  public static void main(String[] args) {  int x = 0;  assert (x  0): “assertion failed”;  System.out.println(“finished”);  }  }  What is the result?()  A、 finishedB、 Compilation fails.C、 An AssertionError is thrown.D、 An AssertionError is thrown and finished is output.

import java.io.IOException;  public class ExceptionTest(  public static void main (String[]args)  try (  methodA();  ) catch (IOException e)  (  system.out.printIn(“Caught IOException”);  ) catch (Exception e)   (  system.out.printIn(“Caught Exception”);  )  )  public void methodA ()   {  throw new IOException ();  }   What is the result?() A、 The code will not compile.B、 The output is caught exception.C、 The output is caught IOException.D、 The program executes normally without printing a message.

填空题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?()

填空题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.printIn (textString + textBuffer);    }   )   What is the output?()

单选题public class IfTest (  public static void main(string[]args) {  int x = 3;  int y = 1;  if (x = y)  system.out.printIn(“Not equal”);  else  system.out.printIn(“Equal”);  }  )   What is the result?()A The output is “Equal”B The output in “Not Equal”C An error at line 5 causes compilation to fall.D The program executes but does not print a message.

单选题public class Test {  public static void main (String[]args) {  String foo = args[1];  String bar = args[2];  String baz = args[3];  System.out.printIn(“baz = ” + baz);  }  }  And the output:  Baz = 2  Which command line invocation will produce the output?()A Java Test 2222B Java Test 1 2 3 4C Java Test 4 2 4 2D Java Test 4 3 2 1

单选题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));   }   }AestBesCstrDstEs

单选题public class Test {  public static void main(String[] args) {  String str = NULL;  System.out.println(str);  }  }   What is the result?()A NULLB Compilation fails.C The code runs with no output.D An exception is thrown at runtime.

单选题public class Test {  public static void leftshift(int i, int j) {  i=j;  }  public static void main(String args[])  {  int i = 4, j = 2;  leftshift(i, j);   System.out.printIn(i); }  }     What is the result?()A 2B 4C 8D 16E The code will not compile.

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

单选题public class Test {  public static void main (String [] args)  {  string foo = “blue”;  string bar = foo;  foo = “green”;  System.out.printIn(bar);  }  }   What is the result?()A An exception is thrown.B The code will not compile.C The program prints “null”D The program prints “blue”E The program prints “green”

单选题public class Test {  public static void main(String[] args) {  int x = 0;  assert (x  0): “assertion failed”;  System.out.println(“finished”);  }  }  What is the result?()A finishedB Compilation fails.C An AssertionError is thrown.D An AssertionError is thrown and finished is output.