What is the advantage of wrapper class in Java?

The primary advantage of Wrapper Classes is that we need Wrapper objects to function with collections which is only possible with the help of Wrapper classes . As the wrapper classes have objects we can store null as a value. We could not store null in variables of primitive datatype.

Sizin İçin Seçtik  What are non-primitive objects in Java?

Leave a Reply

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