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

Can we clone singleton object?

567


What is a data structure java?

506


Can a variable be local and static at the same time?

548


Which is bigger float or double?

519


Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?

683






What do you understand by a Static Variable?

634


Is it necessary that each try block must be followed by a catch block?

562


What are the four pillars of java?

614


Can a class be defined inside an interface?

565


What’s the difference between the methods sleep() and wait()?

543


What is the difference between char and char *?

568


what is the purpose of "virtual"?

570


What is the difference between math floor and math round?

505


What is the common usage of serialization?

578


Does collectionutils isempty check for null?

816