String toUpperCase - Java Language Basics

Java examples for Language Basics:String

Description

String toUpperCase

Demo Code


public class Main {
 
        public static void main(String[] args) {
 
                String str = "string touppercase example";
                String strUpper = str.toUpperCase();
                 /*from  w w w. j  a  va 2s.co m*/
                System.out.println("Original String: " + str);
                System.out.println("String changed to upper case: " + strUpper);
        }
}

Result


Related Tutorials