WordCount
program written during Friday's lecture. Remember that a map stores a relationship between a pair (known as a key to value relationship). What kinds of things do you think you could pair up in this assignment? Take note that the assignment write up states that you will have to include a Map, TreeMap, and String split method in your solution.Map
on the Java API.
Map
store?
String
using Scanner
or StringTokenizer
.
String.split()
, I get some empty strings in the array. Why?
String
so that it takes care of this paticular behavior?
String
, but it doesn't break it apart at the right places. Why not?
System.out.println
to find out which grammar s are being generated at certain points in your program. Try before and after your recursive step as well as in your base case.
String
= to another variable within a recursive step will not translate in all instances of that method. Be sure to actively add onto your String
instead of reassigning it.