Java generics subtype in interface?

Where the Comparable type E is, for example String you would want: public class B implements A { ... } Where you want to retain the generic type parameter declaration in B you would have: public static class B> implements A { ... } Note that the E in A is not related to the E in B i.e. The following is valid: public static class B> implements A { ... } (whether you want to distinguish or not in your code I don't know, but it might help in understanding).

Where the Comparable type E is, for example, String, you would want: public class B implements A { ... } Where you want to retain the generic type parameter declaration in B, you would have: public static class B> implements A { ... } Note that the E in A is not related to the E in B, i.e. The following is valid: public static class B> implements A { ... } (whether you want to distinguish or not in your code I don't know, but it might help in understanding).

I think so too. You have to redeclare that this E is really a Comparable, before you can give it to your interface. – Marnix Jun 24 at 17:04.

Where the Comparable type E is, for example String you would want.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions