Boolean.valueOf

Returns a {@code Boolean} instance representing the specified {@code bool} value. If the specified {@code bool} value is {@code true}, this method returns {@code Boolean.TRUE}; if it is {@code false}, this method returns {@code Boolean.FALSE}. If a new {@code Boolean} instance is not required, this method should generally be used in preference to the constructor {@link #Boolean(bool)}, as this method is likely to yield significantly better space and time performance.

@param b a bool value. @return a {@code Boolean} instance representing {@code b}.

  1. Boolean valueOf(bool b)
    class Boolean
    static
    valueOf
    (
    bool b
    )
  2. Boolean valueOf(string s)

Meta