How to convert String object to Boolean Object?

前端 未结 14 799
我寻月下人不归
我寻月下人不归 2020-11-28 01:28

How to convert String object to Boolean object?

14条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 02:20

    Visit http://msdn.microsoft.com/en-us/library/system.boolean.parse.aspx

    This will give you an idea of what to do.

    This is what I get from the Java documentation:

    Method Detail

    parseBoolean

    public static boolean parseBoolean(String s)

    Parses the string argument as a boolean. The boolean returned represents the value true if the string argument is not null and is equal, ignoring case, to the string "true".

    Parameters:

    s - the String containing the boolean representation to be parsed

    Returns: the boolean represented by the string argument

    Since: 1.5

提交回复
热议问题