University of Cincinnati logo and link  
Strings
 UC Center for Information Technology & Community Development

 

Strings Lab

 

Solution:

/*
 * SimpleStringManip.java
 *
 * Created on September 12, 2004, 10:18 PM
 */

/**
 *
 * @author  Owner
 */
public class SimpleStringManip {
    
    /** Creates a new instance of SimpleStringManip */
    public SimpleStringManip() {
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String simple = "Welcome to Java!";
        System.out.println("Length: " + simple.length());
        System.out.println("Character at 6: " + simple.charAt(6) );
        System.out.println("Substring at positions 2, 5: " + simple.substring(2, 5));
    }
    
}



  Convergys