Prefer primitive types: int, float etc. instead of wrapper types: Integer, Float etc., because they are much more efficient. Instances of wrapper classes are ofcourse objects, which take up more memory than primitives.
Ofcourse sometimes you have to use wrapper types. For example, the
Java collection classes can only store objects, not primitives - an ArrayList<int> is impossible, you'll have to use ArrayList<Integer>.
Saurabh S Jain wrote:I used Float in pojo, etc and find its better to use wapper class type variable in place of native data type
What are your reasons to think that using wrapper classes is better than using primitive types?