I am trying to understand what the following means?
public class Bar<T extends Bar<T>> extends Foo<T> {
//Some code
}
What is the advantage of doing something like this (e.g. use-case?).
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That’s a fairly theoretical example, but you could need it in this case:
You would not be able to call
param.getValue()if T were not aBar, which it is becauseT extends Bar<T>.