单项选择题

下列程序段的输出结果是( )。
String MyStr="Hello,";
MyStr=MyStr+ "World!";
System.out.println(MyStr);

A) Hello, World!
B) Hello,
C) World!
D) 该程序段有语法错误
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序的输出结果为( )。 public class Test public static void main (String args[]) String X= ABCD ; String Y= EFG ; X=X.substring (X.length()-Y.length()); System.out.println(X);
A) ABC
B) BCD
C) EFG
D) ABCDEFG
单项选择题
下面程序段的输出结果是 public class Test public static void main(String args[]) int x,y; x=(int)Math.sqrt(5) 2+(int)Math.random()*5 2; y=(int)Math.sqrt(3) 2+(iht)Math.random()*3 2; if(x>y) System.out.println( x>y ); else if (x==y) System.out.println( x=y ); else System.out.println( x<y );
A) x>y
B) x=y
C) x<y
D) 编译错误
相关试题
  • 下列不是InputStream子类的是( )。
  • 下列有关线程的叙述哪个是正确的A)一旦一...
  • 算法的有穷性是指( )。
  • 以下代码可以被计算机直接执行的是( )。
  • 有以下程序: void main() int i=1...