When generics was introduced in Java5, they also introduced boxing conversion. So you can declare a type parametrised to ose of the eight primitive wrapper types and add primitives:-Remember that an int is not an Object.
There's a project named "Project Valhalla" which people at Oracle are working on, which is about investigating a number of possible new features for a future Java version, such as value types and generic specialization. One of the features we will get when this is added is the possibility to use primitive types as type arguments, without the boxing / unboxing overhead.
i can't help this. java is getting better, but I am impressed with scala and others. in scala there are no primitives. numbers and Booleans are just like classes. you can say 5.+(2). the plus sign is a method of the number class. you can also pass functions(methods)around.