问题 填空题

下列程序的运行结果是 【14】 。 public class Test { public static void main (String args[]) { String s1="hello!"; System.out.println (s1.toUpperCase()); }}

答案

参考答案:HELLO!

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

单项选择题 共用题干题
单项选择题