package ut.programming.training;

import java.util.ArrayList;
import java.util.List;
import org.apache.commons.lang3.StringUtils;

public class Application {
    
    public int countWords(String words) {
        String[] separateWords = StringUtils.split(words, ' ');
        return (separateWords == null) ? 0 : separateWords.length;
    }

    public void greet() {
	List<String> greetings = new ArrayList<>();
	greetings.add("Hello");

	for (String greeting : greetings) {
	    System.out.println("Greeting: " + greeting);
	}
    }
    
    public Application() {
        System.out.println ("Inside Application");
    }

    // method main(): ALWAYS the APPLICATION entry point
    public static void main (String[] args) {
      	System.out.println ("Starting Application");
    	Application app = new Application();
        app.greet();
        int count = app.countWords("I have five words ha.");
        System.out.println("Word Count: " + count);
    }
}

@@ -74,24 +74,72 @@
 .util.List;%0A
+import java.util.Map;%0Aimport java.util.HashMap;%0A
 import org.a
@@ -171,16 +171,16 @@
 gUtils;%0A
-
 %0Apublic 
@@ -578,24 +578,188 @@
 %0A    %7D%0A    %0A
+    public void dict() %7B%0A%09Map%3CString, String%3E map = new HashMap%3CString, String%3E();%0A%09map.put(%22name%22, %22Alex Unstoppable%22)%0A%09System.out.println(map.get(%22dog%22));%0A    %7D%0A%0A
     public A
@@ -1106,24 +1106,24 @@
 ords ha.%22);%0A
-
         Syst
@@ -1162,16 +1162,29 @@
 count);%0A
+%09app.dict();%0A
     %7D%0A%7D%0A

add app method, implement dictionary