/*
 * NameAnalyzer.java
 * Computer Science S-111
 *
 * Demonstrates the use of String objects and methods from the String class.
 */

public class NameAnalyzer {
    public static void main(String[] args) {
        String name = "Perry Sullivan";
        System.out.println("full name = " + name);

        // Get and print the length.
        int length = name.length();
        System.out.println("length = " + length);

        // Extract and print the first name.
        String first = name.substring(0, 5);
        System.out.println("first name = " + first);
        
        // Extract and print the last name.
        String last = name.substring(6);
        System.out.println("last name = " + last);
    }
}
