Answer Posted / tarun
Please go through this link for more knowledge
http://java.sun.com/j2se/1.5/pdf/generics-tutorial.pdf
Generics is the new feture added in the JAVA5.0. It feature
is useful in some broad applications when we are writing any
database insertion logic for the same type of Object.
suppose we have to insert a list of Employee Object this
will be declared as List<Employee> or suppose we have a list
of long values then we can simply type cast it as
List<Long>, Similarly List<String>, List<Integer>. The
generics class are used by Wrapper classes or any other
classes. Most useful in ORM technologies also.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Why array is used in java?
What do you understand by overloading and overriding in java?
What are the differences between wait() and sleep()?
What is locale in java?
What is java util concurrentmodificationexception?
What is lifetime variable?
Is math an abstract class in java?
How to overcome the exception object reference not set to an instance of object?
Explain about assignment statement?
How do generics work in java?
What is the difference between hashmap and hashtable in java?
Why java is object oriented?
Which keyword specify that a variable is effectively final ?
What is the difference between object oriented programming language and object based programming language?
What is an eror in java?