1string s="hello";
2s = Character.toUpperCase(s.charAt(0)) + s.substring(1);
3The output will be: Hello
1public class Guru99 {
2 public static void main(String args[]) {
3 String S1 = new String("minúsculas convertidas en mayúsculas");
4
5 // Convertir a UpperCase
6 System.out.println(S1.toUpperCase());
7 }
8}
9
1public class StringToUppercaseDemo
2{
3 public static void main(String[] args)
4 {
5 String str = "flower brackets";
6 String strUpper = str.toUpperCase();
7 System.out.println(strUpper);
8 }
9}