What is the main use of generics in java?



What is the main use of generics in java?..

Answer / Neeta Shweta Kerketta

"Generics are used to provide type safety in Java and allow a class, interface or method to work with objects without explicitly stating their data types"

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the kinds of polymorphism?

1 Answers  


What is the this keyword?

1 Answers  


What is codebase?

1 Answers  


What are the two environment variables that must be set in order to run any java programs?

1 Answers  


What are parsers? Dom vs sax parser.

1 Answers  


What is the main difference between java platform and other platforms?

1 Answers  


What is difference between stringbuffer and string?

1 Answers  


Can a constructor be protected?

1 Answers  


What is n in java?

1 Answers  


How do generics work in java?

1 Answers  


Can constructor be synchronized?

1 Answers  


What is a singleton class in Java? And How to implement a singleton class?

2 Answers  


Categories