Chop your own wood, and it will warm you twice. - Henry Ford
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Rob Prime:
With List<? super Double>, you know that the generic type is a Double or any of its super classes - Number or Object. So let's consider the options:
List<Double> - no problem in adding a Double here
List<Number> - a Double is a Number, so no problem here either
List<Object> - anything is an object, so no problem here either
Chop your own wood, and it will warm you twice. - Henry Ford
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Chop your own wood, and it will warm you twice. - Henry Ford
Originally posted by Kartik Patel:
ls.add(honda); // Fine Honda super Honda
ls.add(civic); // ITS WORKINGWHY??? civic is not super of Honda
ls.add(vehicle); // Its not WORKINGWHY??? Vehicle super Honda right?
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Chop your own wood, and it will warm you twice. - Henry Ford
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Consider Paul's rocket mass heater. |