java toUpperCase() and toLowerCase() example
Categories: Java 9 Java 8(JDK1.8) Java Java Examples
import java.util.*;
public class r4r{
public static void main(String[] args) {
String str="Rajesh Kumar";
System.out.println("Upper Case:-"+str.toUpperCase());
System.out.println("Lower Case:-"+str.toLowerCase());
}
}
Output:
Upper Case:-RAJESH KUMAR
Lower Case:-rajesh kumar