WordCount2.java

The above is the solution for Question 2 of Assignment