[单选题]

阅读下面程序 public class ConcatTest { public static void main(String[] args) { String str1="abc"; String str2="ABC": String str3=str1.concat(str2); System.out.println(str3); } } 程序运行的结果是

A.abc

B.ABC

C.abcABC

D.ABCabc

参考答案与解析:

相关试题

阅读下面程序 public class ConcatTest{public st

[单选题]阅读下面程序 public class ConcatTest{ public static void main(String[] args) { String strl = "abc"; String str2 = "ABC"; String str3 = str1.concat(str2); System.out.println(str3); } } 程序的运行结果是:A.abeB.ABCC.abcABCD.ABCabc

  • 查看答案
  • 阅读下面程序 public class ConcatTest{public st

    [单选题]阅读下面程序 public class ConcatTest{ public static void main(String[] args) { String strl = "abc"; String str2 = "ABC"; String str3 = str1.concat(str2); System.out.println(str3); } } 程序的运行结果是:A.abeB.ABCC.abcABCD.ABCabc

  • 查看答案
  • 阅读下面程序public class ConcatTest{P ublic st

    [单选题]阅读下面程序public class ConcatTest{P ublic static void main(String[] args){S tring str1 = " abc " ;S tring str2 = " ABC " ;S tring str3 = str1.concat(str2);S ystem.out.println(str3);}}程序的运行结果是A.)abcB.)ABCC.)abcABCD.)ABCabc

  • 查看答案
  • 请阅读下面程序 public class ThreadTest{public s

    [单选题]请阅读下面程序 public class ThreadTest{ public static void main(String args[]) ( Thread t1=new Thread(new Hello()); Thread t2=new Thread(new Hello()); t1.start(); t2.start(); } } class Hello implements Runnable { int i; public void run() { while(true) { Sys

  • 查看答案
  • 请阅读下面程序 public class ThreadTest{public s

    [单选题]请阅读下面程序 public class ThreadTest{ public static void main(String args[]) ( Thread t1=new Thread(new Hello()); Thread t2=new Thread(new Hello()); t1.start(); t2.start(); } } class Hello implements Runnable { int i; public void run() { while(true) { Sys

  • 查看答案
  • 阅读下面程序public class Test2______ {public s

    [单选题]阅读下面程序 public class Test2______ { public static void main(String[] args){ Thread t=new Test2(); t. start(); } public void run(){ System. out. priatln("How are you. "); } } 在程序下画线处填入的正确的选项是A.implements ThreadB.extends RunnableC.implements RunnableD.

  • 查看答案
  • 阅读下面程序public class Test2______ {public s

    [单选题]阅读下面程序 public class Test2______ { public static void main(String[] args){ Thread t=new Test2(); t. start(); } public void run(){ System. out. priatln("How are you. "); } } 在程序下画线处填入的正确的选项是A.implements ThreadB.extends RunnableC.implements RunnableD.

  • 查看答案
  • 阅读下面程序public class VariableUse { public

    [单选题]阅读下面程序 public class VariableUse { public static void main(String[] arqs) { int a; if(a==8) { int b=9; System.out.println("a="+a); System.out.println("b="+b); } System.out.println("a="+a); System.out.println("b="+b): } } 该程序在编译时的结果是A.变量a未赋值B.第

  • 查看答案
  • 阅读下面程序:public class ThreadTest { public

    [单选题]阅读下面程序: public class ThreadTest { public static void main(String args[]) throws Exception { int i=0; Hello t=new Hello(); ______; While(true) } System.out.println("Good Morning"+i++); if(i==2&&t.isAlive()) { System.out.println("Main waitin

  • 查看答案
  • 阅读下面程序public class Increment { public st

    [单选题]阅读下面程序 public class Increment { public static void main( String args[] ){ int c; c=5; System.out.println(C) ; System.out.println(c++); System.out.println(C) ; } }A.5 6 6B.5 5 6C.6 7 7D.6 6 6

  • 查看答案
  • 阅读下面程序public class ConcatTest { public s