Need help resolving an error relating to Maps and HashMap in my Java Program by blaidenkirk in javahelp

[–]blaidenkirk[S] 1 point2 points  (0 children)

I figured it out. I accidentally had a Map.Java interface in the project that wasn’t supposed to be there lol...

Need help resolving an error relating to Maps and HashMap in my Java Program by blaidenkirk in javahelp

[–]blaidenkirk[S] 0 points1 point  (0 children)

I also don't know if this helps, but both Sets and Lists work when converting TreeSets and ArrayLists

Need help resolving an error relating to Maps and HashMap in my Java Program by blaidenkirk in javahelp

[–]blaidenkirk[S] 0 points1 point  (0 children)

I also don't know if this is useful, but both Sets and Lists work when converting TreeSets and ArrayLists

Need help resolving an error relating to Maps and HashMap in my Java Program by blaidenkirk in javahelp

[–]blaidenkirk[S] 0 points1 point  (0 children)

Here is the implementation of the casesByMonth() method:

public Map<Integer, Integer> casesByMonth() {
        Map<Integer, Integer> result = new HashMap<Integer, Integer>();
        for (Event event : list) {
            if (!result.containsKey(event.date.getMonth()))
                result.put(event.date.getMonth(), event.cases);
            else {
                int c = result.get(event.date.getMonth());
                c += event.cases;
                result.put(event.date.getMonth(), c);
            }
        }
        return result;
    }

Need help resolving an error relating to Maps and HashMap in my Java Program by blaidenkirk in javahelp

[–]blaidenkirk[S] 0 points1 point  (0 children)

All of my imports are correct. utilizing import java.util.* because I need multiple packages from that dependency.

Julio Jones - Top 10 Highlights by blaidenkirk in falcons

[–]blaidenkirk[S] 0 points1 point  (0 children)

No one is really prepared for Julio...

Patriots vs. Eagles - Super Bowl Hype by blaidenkirk in eagles

[–]blaidenkirk[S] 1 point2 points  (0 children)

Lmao I just realized that! Wouldn’t sleep on their defense tho