public class DemoText {
public static void main(String[] args) {
fun();
}
public static void fun(){
String s="heLLo";
String s2=s.substring(0,1);
System.out.println("heLLo首字母为: "+s2);
String s3=s2.toUpperCase();
System.out.println("转为大写字母后为: "+s3);
String s4=s.substring(1).toLowerCase();
System.out.println("剩下的字母转换为小写后为: "+s4);
System.out.println("最终输出的结果为: "+s3+""+s4);
}
}