Home >>Java String Methods >Java String toUpperCase() Method
The toUpperCase() method in Java String is used to converts a string to upper case letters.
public String toUpperCase()
None
It is used to return A String value which represents the new string converted to upper case
public class MyClass
{
public static void main(String[] args)
{
String txt1 = "Hello Phptpoint";
System.out.println(txt1.toUpperCase());
System.out.println(txt1.toLowerCase());
}
}
public class MyClass
{
public static void main(String args[])
{
String n1="welcome tO PHptPoint World";
String s1upper=n1.toUpperCase();
System.out.println(s1upper);
}
}