What do you want to save?
Add Code snippet
New code examples
-
Java 2022-01-26 01:25:16
why cant we have primitive types in generixs
//In java generics are implemented by using "Type erasure" for backward compatibility. All generic types are converted to Object at runtime. for example, public class Container<T> { private T data; public T getData() { r... Add solution -
Java 2021-11-03 01:18:11
generics Interface in java
/*Suppose we want to restrict the type of objects that can be used in the parameterized type, for example in a method that compares two objects and we want to make sure that the accepted objects are Comparables. To declare a bounded type parameter, list t... Add solution