647

Help Java 5.0 Generics

Example 1:public interface I>{ I extends I> m1 ();}public class Z> implements I{ public I extends I> m1 () { return m2(); } protected I extends I> m2 () { return null; }}>javac Z.javase compileaza absolut fara problemeExample 2:public interface I>{ I> m1 ();}public class Z> implements I{ public I> m1 () { return m2(); } protected I> m2 () { return null; }}>javac Z.javaZ.java:5: incompatible typesfound : I>required: I> return m2(); ^1 errorWhat the XXX? Cum se poate lecui problema de mai sus? Sau ceva explicatii de ce apare? Ce are Tx cu problema de "capture of"?Testat peWinXP (& linux slackware) java sdk 1.5.0_05 & java sdk 1.5.0_04
0