I\'m defining a class:
class Foo> {
}
the compiler is complaining about I
being
If I
is already defined in the outer class just make this
public class Outer<I extends Bar & Comparable<I>> {
public class Foo<I> {
}
}
You cannot redefine I
in your inner class. The I
of the inner class would be something else than the I
of the outer class, if this is what you want, well, rename it.
HTH
Don't make the inner class parameterized:
class Baz<I extends Bar & Comparable<I>> {
class Foo {
}
}
As an inner (non-static nested) class, I
as defined in the Baz
declaration will still have meaning in Foo
, since every Foo
will have an implicit reference to its outer Baz
instance.