2
는 어쩌면 바보 같은 질문 : 난 상관 없어이 시점에서Java generics : <?>의 차이점은 무엇인가요?
List<A> aces = list with instances of B and C;
List<Wrapper> wrapperedItems = flattened list of lists returned from doStuff() on all items in aces
:하자 내가
abstract class A<T> {
List<Wrapper<T>> doStuff()
}
이 그리고 내가 갖고 싶어 이제
class B extends A<String>
및 class C extends A<Integer>
이 있다고 어떤 유형이 Wrapper
내에 있습니다. 그리고 내 질문은 : 어딘가에서 <?>
을 사용해야합니까, 아니면 건너 뛸 수 있습니까? 그 차이점은 무엇입니까?
가능한 [List와 List의 차이] > (http://stackoverflow.com/questions/14983489/difference-between-list-and-list) –
http://stackoverflow.com/questions/7360594/whats-the-difference-raw-types-unbounded-wild-cards-and-using-object-i –