public static void main(String[] args) {
    
        System.out.println("\nThis program asks the user for a line of text " +
            "then displays the text as separate word in different lines.");
    
        // Allow multiple operations
        while (true){
            
            System.out.print("\nGive me a line: ");
            String usrStr;
            usrStr = TextIO.getln();
            
            String word = " ";
            int i;
            int max = usrStr.length();
            for (i = 0; i < max; i++){
                char c = usrStr.charAt(i);
                if (Character.isLetter(c) || c == '\''){
                    word += c;
                }
                else {
                    if (!word.equals(" ")) {
                        System.out.println(word);
                        word = " ";
                    }
                }
            }
        
            // Ask user if he/she wants to try again
            char choice;
            System.out.print("\nDo you want to try again?" +
                "\n (Enter \'y\' or \'Y\' to try again) " );
            choice = TextIO.getlnChar();
            if (choice == 'y' || choice == 'Y')
                continue;
            else
                break;
        } // end execution
        
    } // end main ()