Why generics are used in java?
Answer / Rajeev Kumar Malik
Generics are used in Java to provide type safety and improve performance by avoiding explicit type casting. They allow the creation of reusable classes and methods that can work with multiple data types.
| Is This Answer Correct ? | 0 Yes | 0 No |
What do you mean by exception handling in Java?
What is use of super keyword in java?
What are the advantages of encapsulation in java?
Why a dead thread occurs?
What is the purpose of void?
What releases of Java technology are currently available? What do they contain?
What JNDI(Java Naming and Directory Interface) provides?
What is the difference between Access Modifier and Access specifier?
How is hashset defined in java?
What is the difference between equals() and == in java?
Java violates few objected oriented concepts. Can you explain in what way?
What is difference between string and new string?