/**
 * @file TreeStory.java
 * @author Valery Samovich
 * @version 1
 * @date 2015/05/11
 */

package com.samovich.basics.concepts.strings.treehouse;

import java.io.Console;
import java.util.Scanner;

public class TreeStory {

    public static void main(String[] args) {

        // __Name__ is a __adjective__ __noun__.
        // They are always __adverb__ __verb__.

//        Console console = System.console();
//        String name = console.readLine("Enter a name:  ");
//        String adjective = console.readLine("Enter an adjective:  ");
//        String noun = console.readLine("Enter a noun:  ");
//        String adverb = console.readLine("Enter an adverb:  ");
//        String verb = console.readLine("Enter a verb ending with -ing:  ");
//        console.printf("Your TreeStory:\n----------------\n");
//        console.printf("%s is a $s %s. ", name, adjective, noun);
//        console.printf("They are always %s %s.\n", adverb, verb);

        Scanner scanner = new Scanner(System.in);
        System.out.println("Enter a name:  ");
        String name = scanner.nextLine();
        System.out.println("Enter an adjective:  ");
        String adjective = scanner.nextLine();
        System.out.println("Enter a noun: ");
        String noun = scanner.nextLine();
        System.out.println("Enter an adverb: ");
        String adverb = scanner.nextLine();
        System.out.println("Enter a verb ending with -ing:  ");
        String verb = scanner.nextLine();
        // Print the prototype
        System.out.println(name + " is a " + adjective + " " + noun + ".");
        System.out.println("He is always " + adverb + " " + verb + ".");
    }
}

@@ -365,25 +365,26 @@
 erb__.%0A%0A
-//
+ 
        
+//
  Console
@@ -412,25 +412,26 @@
 sole();%0A
-//
+ 
        
+//
  String 
@@ -470,33 +470,34 @@
  name:  %22);%0A
-//
+ 
        
+//
  String adje
@@ -543,33 +543,34 @@
 ctive:  %22);%0A
-//
        
+ //
  String noun
@@ -605,33 +605,34 @@
  noun:  %22);%0A
-//
        
+ //
  String adve
@@ -676,25 +676,26 @@
 b:  %22);%0A
-//
        
+ //
  String 
@@ -751,33 +751,34 @@
  -ing:  %22);%0A
-//
        
+ //
  console.pri
@@ -821,25 +821,26 @@
 --%5Cn%22);%0A
-//
+ 
        
+//
  console
@@ -894,17 +894,18 @@
 n);%0A
-//
+ 
        
+//
  con
@@ -1517,16 +1517,92 @@
 ototype%0A
+        System.out.println(%22Your TreeStory:%5Cn-------------------------%5Cn%22);%0A
         

Update Multiple Strings Example for Console and Scanner prototype