Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   




String - toUpperCase() Method


String toUpperCase()


toUpperCase() replaces all lowercase letters to uppercase.


Example :



public class Test{
	public static void main(String[] arg){
		String firstString = "HeLLo"; 
		String upperString=firstString.toUpperCase();     
		
		System.out.println("The new upper case String is : "+newString);
	}
}


Output :



  The new upper case String is : HELLO

Converts all the letters to uppercase.