what is generics in jdk1.5?

Answer Posted / rohitjadhav

Hi,

Generics is Template support added in JDK1.5 where in we can maintain templates of object with particular type and also this object is restricted to accept type other than specified one at code time.
This help reducing runtime exception and also we can create predefined well formed templates of Type.

Best Example.

http://java.sun.com/j2se/1.5.0/docs/relnotes/features.html#generics

Code written to use the generics feature should not be a lot slower or a lot more memory-intensive than non-generic code. Using ten percent more space or time than ....

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What must a class do to implement an interface in java programming?

533


Lowest Common ancestor in a Binary Search Tree and Binary Tree.

551


Can we override the static method?

576


How does varargs work in java?

609


What is difference between calling start() and run() method of thread?

555






What is the significance of java packages?

609


Why is method overloading not possible by changing the return type in java?

585


What is a linkedhashmap java?

547


Will set allow duplicates in java?

497


How many bytes is a unicode character?

503


What is <> used for in java?

667


Is Java a dying language?

569


How is a structure different from array ?

579


Why is stringbuffer not immutable?

563


What does substring mean?

509