String Exercise

Name:  ______________________________________________________________________

Show the output and/or fill in the code for the statements below:

   String letters =  "abcdefghijklm";

    

   System.out.println( letters.substring(0,3) );
       
   System.out.println( letters.substring(3,8) );
       
   System.out.println( letters.substring(10, letters.length()));
    
   System.out.println( letters.substring(11) );      


   String state = "North Carolina State University";
    
   for (int i = 3; i < state.length(); i = i + 3)
    
      System.out.println( "i = " + i + " - " + state.charAt(i) );
      	    





	    
	    
	    



	    
	    
	    
	    
   String rival = "University of North Carolina at Chapel Hill";
   
   
   StringTokenizer t =   ______     _________________ (rival);
       
   
   while ( t.__________________)
      
      
      System.out.println( t.___________________ );