单项选择题

下列的哪个程序段可能导致错误

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";
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的输出结果是( )。interface Inter{public final static int A=100;}class My implements Inter{public static void main (String args[ ]){System.out.println(A) ;}
A.100
B.0
C. A
D. 程序有错误
单项选择题
下列程序的执行结果是( )。public class Testhh {public static void main(String args [] ) {Strings1=new String( I am boy );Strings2=new String( I am boy );System.out.println(s1.equals(s2));}}
A. true
B. false
C. I am boy
D. 都不正确
相关试题
  • Java语言中,有一个类是所有类或接口的父类...
  • 传递给实现了java.awt.event.MouseMotio...
  • 有定义boolean b1=5!=6;,则变量b...
  • Java语言以【 】为程序的基本单位,它是具...
  • 【 】是字符的序列,也是组织字符的基本结构。