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
What is a protected method?
What do you mean by inner class in java? Explain
why java uses class level type casting ?
What do you understand by the term polymorphism?
If a variable is declared as private, where may the variable be accessed?
What does += mean in java?
What is a double vs float?
What is data member in java?
What are the 4 versions of java?
4.1 Supply contracts (in the form of comments specifying pre- and post conditions) for the enqueue() method of the LinkedQueue class given in the Appendix. (2) 4.2 Let Thing be a class which is capable of cloning objects, and consider the code fragment: Thing thing1 = new Thing(); //(1) Thing thing2 = thing1; //(2) Thing thing3 = (Thing) thing1.clone(); //(3) Explain how the objects thing2 and thing3 differ from each other after execution of the statements. (
what methods would you overwrite in java.lang.object class?
What is a literal coding?
Is set thread safe java?
Why for each loop is used?
define polymorphism in java