how-to

Working with String

How to convert String to lower/upper cases

Use this sample for text conversion to lower/upper cases:

String s = "This is text";
System.out.println( s );

/* -- to lower cases */

System.out.println( s.toLowerCase() );

/* -- to upper cases */

System.out.println( s.toUpperCase() );
The output will be:
This is text
this is text
THIS IS TEXT