Why, when entering a new variable with an existing variable, is it all or nothing?
For example, let's say I have a variable datawhose type List<Map<String, ArrayList<String>>>, and I want to pass its value tempData. Why when choosing type tempDataam limits me Listor List<Map<String, ArrayList<String>>>?
If I want to interact only with a certain level of "t20", say, at a level Map, how can I just go there? For example, why can't I List<Map> tempData = data?
I was looking for my tutorial and this site, but I can not find anywhere that explains why this is so. Is there anything that could go wrong if we are allowed to "partially dial"?
I know that I can just type very hard tempDatato start, but I'm curious why in Java everything or nothing fits.
source
share