下列哪个程序段可能导致错误?
A.String s="hello"; String t= "good"; String k=s+ t;
B.String s="hello"; String t; t=s[3]+"one";
C.String s="hello"; String standard=s. toUpperCase
D.String s="hello"; String t =s+ "good"
第1题:
下列的哪个程序段可能导致错误? ( )
A.String s="hello"; String t="good"; String k=s+t;
B.String s="hello"; String t; t=s[3]+"one";
C.String s="hello"; String standard=s.toUpperCase();
D.String s="hello"; String t=s+"good";
第2题:
3下列程序段运行的结果为( )。 public class Test{ static void print(String s,int i){ System.out.pdntlnC String: "+s+",int:"+i); } static void print(iht i,String s){ System.out.prinflnCint:"+i+",gtring:"+s); } public static void main(String[] args){ print(99,"Int first"); } }
A.String:String first,int: 11
B.int: 11,String:Int first
C.String:String first,int:99
D. int:99,Stfing:Int first
第3题:
下列的哪个程序段可能导致错误?
A.String s = "hello"; String t = "good"; String k = s + t;
B.String s = "hello"; String t; t = s[3] + "one";
C.String s = " hello "; String standard = s.toUpperCase( );
D.String s = "hello"; String t = s + "good";
第4题:
下列程序段运行的结果为 public class Test{ static void print(String s,int i){ System.out.println("String:"+s+",int:"+i); } static void print(int i, String s){ System.out.println("int:"+i+",String:"+s); } public static void main(String [] args){ print(99,"Int first"); } }
A.String:Stringfirst,int:11
B.int:11,String:Int first
C.String:String first,int:99
D.int:99,String:int first
第5题:
下列的( )程序段可能导致错误。
A.String s="hello": Sting t="good"; String k=s+t;
B.Sting s="hello"; String t; t=s [3] + "one";
C.Sting s="hello"; String standard=s.toUpperCase( );
D.String s="hello": Stringt s +"good";