/**
 * Examples for strings and scanner 
 * 
 * @author Kathryn
 * @version September 14, 2005
 */

import java.util.* ;

public class StringScan
{
    
    public static void main(String[] args)
    {
        // examples of string functions and usage
        String alphabet = "abcdefghijklmnopqrstuvwxyz";
        
        char c1 = alphabet.charAt(4);
        int i1 = alphabet.indexOf("yz");
        String abc = alphabet.substring(2,5);

        System.out.println("c1, i1, abc: " + ", " + c1 + ", " + i1 + " " + abc + "\n");
    
        // Working with System.in
        // Show grabbing a word (vs sentence), grabbing a word for a number
/*        
        // allocates an object of class Scanner
        Scanner stdin = new Scanner(System.in);

        System.out.print("Enter your name: ");	

        int wordLength = name.length();	
        System.out.println("Name " + name + " has length " + wordLength + ".\n");	
        
        System.out.println("Enter the length of your commute in miles: ");
 	
 */    
    }
    
}

