Norm Radder wrote:How are you trying to debug your problem?
Print out the values of the Map, the keySet, the keys and the values to see what the code is doing.
null
Henry Wong wrote:
Well, since the "todo" map is declared as taking a Set<String> as a key -- and *not* a string key -- shouldn't it be obvious why there is no value to any string key?
Henry
Carey Brown wrote:If you want a Map where you can search for a key of the String "MONDAY:" you would have had to declare the Map as:
adebari olalekan wrote:
Carey Brown wrote:If you want a Map where you can search for a key of the String "MONDAY:" you would have had to declare the Map as:
the reason i used it that way is because i have been declaring the Map that way and i really admired how it worked without any memory flaws. let me show a code ii wrote and it worked fine by declaring map as Map<Set<String>,String> todo = new LinkedHashMap<>():
this code compiled and run perfectly , please can you tell why it worked and this one didnt
the keys as well as the values printed out perfectly.
//{[MONDAY:]=4:00am: WRITE POEM, 7:00am:EXERCISE, 8:00am: VOCABULARY BUILDING, ... < note extra [ ]s
//{MONDAY:=4:00am: WRITE POEM, 7:00am:EXERCISE, 8:00am: VOCABULARY BUILDING, ...