[Solved] Passing Boolean to method that expects boolean [closed]
Unboxing When you call a method that wants a boolean but give it a Boolean, Java has to unbox the value. This happens automatically and implicitly. Therefore, during compilation, Java replaces your call foo(value); by foo(value.booleanValue()); This process is explained in detail in JLS, chapter 5.1.8. Unboxing Conversion: At run time, unboxing conversion proceeds as … Read more