Why does the Boolean object have a public constructor in Java?

前端 未结 5 1628
逝去的感伤
逝去的感伤 2021-01-03 20:58

Documentation for the constructor new Boolean(boolean value) in Java states:

Note: It is rarely appropriate to use this constructor. Unle

5条回答
  •  青春惊慌失措
    2021-01-03 21:39

    Another, not necessarily good reason would probably be to simply keep it consistent with the other native wrappers.

提交回复
热议问题