public class StringTest { public static void main( String[] args ) { // // TEST 1 // char[] ca = { 'j', 'a', 'v', 'a' }; // String caStr = new String( ca ); // System.out.println( caStr ); // // // TEST 2 // String s = "JAVA"; // System.out.println( s ); // // // Test 3: // System.out.println( "JAVA3" ); // // // TEST 4: // String h1 = "HELLO"; // int l = h1.length( ); // System.out.println( l ); // // System.out.println( "HELLO".length( ) ); // // // TEST 4: // System.out.println( "HELLO".toLowerCase( ) ); // // System.out.println( "HELLO".indexOf('L', 3 ) ); // String j = "JAVA"; // System.out.println( j.concat( "Student" ) ); // System.out.println( j ); // // // ====== // String s = "HELLO"; // s = s.concat( "WORLD" ); // System.out.println( s ); // // // -------------- // String str = "BSC"; // String rs = str.concat( "COMP SC" ); // System.out.println( rs ); // ---------------------------- // String s1 = "Java string split method"; // String[] words = s1.split( "\\s" ); // for ( int i = 0; i < words.length; i++ ) { // System.out.println( words[ i ] ); // } // ======================== String s = "HELLO"; System.out.println( s ); System.out.println( s.toString( ) ); } }