Here we make a string to upper from lower case for the use of toUpperCase() method.
example:
|
import java.io.*; public class Utest{ public static void main(String args[]){ String S = new String("Welcome to my india"); System.out.print("Return Value :" ); System.out.println(S.toUpperCase() );}} output: WELCOME TO MY INDIA |
Here we make a string to lower from upper case for the use of toLowerCase() method.
example:
|
import java.io.*; public class Ltest{ public static void main(String args[]){ String S = new String("WELCOME TO MY INDIA "); System.out.print("Return Value :"); System.out.println(S.toLowerCase());}} output: welcome to my india |