[填空题] 下列程序的运行结果是 【14】 。 public class Test public static void main (String args[]) String s1="h

11 查阅

[填空题] 下列程序的运行结果是 【14】

public class Test

public static void main (String args[])

String s1="hello!";

System.out.println (s1.toUpperCase());

参考答案:

HELLO!

在String类的常用方法中,toUpperCaee()方法将当前字符串中的所有小写字母转化成大写,其他字符保持不变。

计算机考试