About Question enthuware.ocpjp.v21.2.3096 :
Posted: Mon Oct 06, 2025 1:21 pm
3 - public <T> ArrayList<T> transform(List<T> list) { return new ArrayList<T>(); };
that works fine.but why these are not working?
1 - public ArrayList<Number> transform(List<Number> list) { return new ArrayList<Number>(); };
2 - public ArrayList<Object> transform(List<Object> list) { return new ArrayList<Object>(); };
that works fine.but why these are not working?
1 - public ArrayList<Number> transform(List<Number> list) { return new ArrayList<Number>(); };
2 - public ArrayList<Object> transform(List<Object> list) { return new ArrayList<Object>(); };