How primitive data types can be used as objects in Java?

The eight primitive data types byte, short, int, long, float, double, char and boolean are not objects, Wrapper classes are used for converting primitive data types into objects , like int to Integer etc. Lets take a simple example to understand why we need wrapper class in java.

Sizin İçin Seçtik  How is an object method called?

Leave a Reply

Your email address will not be published. Required fields are marked *