public class MainClass
{
public static void main( String args[] )
{
String s1 = new String( "hello" );
String s2 = new String( "GOODBYE" );
String s3 = new String( " spaces " );
System.out.printf( "s1 = %s\ns2 = %s\ns3 = %s\n\n", s1, s2, s3 );
// test toLowerCase and toUpperCase
System.out.printf( "s1.toUpperCase() = %s\n", s1.toUpperCase() );
System.out.printf( "s2.toLowerCase() = %s\n\n", s2.toLowerCase() );
}
}
|