|
|
|
|
|
by blauditore
3233 days ago
|
|
I thought this was quite clear, and it's what I've always been missing in languages like Python or JS. Yet I meet many devs, especially coming from such languages, making fun of Java for its verbosity and clumsiness. On the other hand, it leads to some people abusing the static type system: They just randomly change types until it somehow compiles, without thinking about what their doing. |
|
ArrayList<Map<String,Object>> myArrayList = new ArrayList<Map<String,Object>>();
Could have been just:
ArrayList<Map<String,Object>> myArrayList = new();
or even better:
ArrayList<Map> = new(); <- if you don't care what the type of map is.