Duplicate :
|
The following program is given an unchecked cast warning, but there should be no warning because the cast is statically known to be safe. class Main { <T, U extends T, V extends T> T cond1(boolean z, U x1, V x2) { return (z? (T) x1: x2); } }
|