私は2つのメソッドの宣言は次の混乱を持っている:<U、T extends U>と<T、U super T>は同じですか?
private <U, T extends U> T funWorks(T child, U parent) {
// No compilation errors
}
private <T, U super T> T funNotWorks(T child, U parent) {
// compilation errors
}
は、上記の両方が有効ではないでしょうか? の類推でUがTの親である場合、TはUの子である。それでは、なぜ2番目のものはコンパイルエラーですか?
編集: 私は、T extends T
とT super T
の両方が有効だと思います。右 ?
私は 'T extends U' 'T> = U'を意味し、' U super T'は 'U
EJP
[this thread](http://stackoverflow.com/questions/) 1368166/e-and-a-e-between-a-difference-e) – DayS
@DayS:Thats about? - 何でも。という事は承知しています。しかし、TとUの場合には何がありますか? –