Why are there wrapper classes in Java? [duplicate]

Several possible reasons:

  • So that a null value is possible
  • To include in a Collection
  • To treat generically / polymorphically as an Object along with other Objects

Leave a Comment