puclic class ClassA<T> {
}
what is the following technique called where you can pass a class type to another class and use it withing the class for type safety? I am talking about the <T> after my class name
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.
Java generics.
It is the way of typecasting your class so that referential integrity is checked at compile time instead of runtime.
The complete tutorials are at
http://download.oracle.com/javase/tutorial/extra/generics/index.html
http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf