Hi guys what is a parameters of interface in Java?
Printable View
Hi guys what is a parameters of interface in Java?
Please give us some context because the statement "parameters of interface" doesn't mean much to me. Where exactly have you seen this and how was it used?
example:
interface A<T> extends Comparable<T> {
// ...
}
or
interface A<T extends Comparable<T>> extends Comparable<A<T>> {
// ...
}
"<T extends Comparable<T>> extends Comparable<A<T>>" and <T> extends Comparable<T> what is this?
thank you :)
You appear to be referring to the generic parameters being used, here T and its many variations. Please have a look at the Java Generics Tutorial and also this tutorial for details on what these are and how to use them.