Autoboxing and Unboxing

Autoboxing and Unboxing is introduced in java since the version of 1.5. A Autoboxing is the automatic conversation that when we convert a primitive type to its corresponding wrapper class; Example int intPrimitive = 15; Integer intWrapper = new Integer(intPrimitive); double doublePrimitive = 15.10; Double doubleWrapper = new Double(doublePrimitive); Unboxing is the reversed version of

Generics

Generics can be thought of a pool containing as many objects as possible or allowing us to bring as many objects as we wish in i as well. So the below code is a simple java bean holding two objects with getters and setters nothing has been specified because we don’t know what sort of