下列程序段的运行结果是() String str1 = “Good”; String str2 = “morning”; String str3 = str1.toLowerCase()+str2.toUpperCase(); System.out.println(str3);
A: Goodmorning
B: gOODmORNING
C: goodmorning
D: goodMORNING
A: Goodmorning
B: gOODmORNING
C: goodmorning
D: goodMORNING
举一反三
- 下列程序段的运行结果是() String str1 = “Good”; String str2 = “morning”; String str3 = str1.toLowerCase()+str2.toUpperCase(); System.out.println(str3); A: Goodmorning B: gOODmORNING C: goodmorning D: goodMORNING
- 中国大学MOOC: 下列程序段的运行结果是() String str1 = “Good”; String str2 = “morning”; String str3 = str1.toLowerCase()+str2.toUpperCase(); System.out.println(str3);
- public class ChangeStrDemo { public static void changeStr(String str){ str="welcome"; } public static void main(String[] args) { String str="home"; changeStr(str); System.out.println(str); } }给出程序的运行结果( )
- 下面程序段的输出结果是 public class A{ public static void main(String args[]) { String str ="Hello,"; str=str+"Guys!"; System.out.println(str); } }
- 声明一个有3个元素的String类型的数组,不正确的是 A: String[] str = new String[3]; B: String str[] = new String[3]; C: String [] str = new String[3]; D: String[3] str = new String();