Java.lang.Boolean类

类声明

以下是声明java.lang.Boolean class:

public final class Boolean
   extends Object
      implements Serializable, Comparable<Boolean>

字段域

Following are the fields for java.lang.Boolean class:

  • static Boolean FALSE -- This is the Boolean object corresponding to the primitive value false.

  • static Boolean TRUE -- This is the Boolean object corresponding to the primitive value true.

  • static Class<Boolean> TYPE -- This is the Class object representing the primitive type boolean.

类构造方法

S.N. 构造方法 & 详细描述
1 Boolean(boolean value)
This allocates a Boolean object representing the value argument.
2 Boolean(String s)
This allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".

类方法

S.N. 方法 & 描述
1 boolean booleanValue() 
This method returns the value of this Boolean object as a boolean primitive.
2 int compareTo(Boolean b) 
This method compares this Boolean instance with another.
3 boolean equals(Object obj) 
This method returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
4 static boolean getBoolean(String name) 
This method returns true if and only if the system property named by the argument exists and is equal to the string "true".
5 int hashCode() 
This method returns a hash code for this Boolean object.
6 static boolean parseBoolean(String s) 
This method parses the string argument as a boolean.
7 String toString() 
This method returns a String object representing this Boolean's value.
8 static String toString(boolean b) 
This method returns a String object representing the specified boolean.
9 static Boolean valueOf(boolean b) 
This method returns a Boolean instance representing the specified boolean value.
10 static Boolean valueOf(String s) 
This method returns a Boolean with a value represented by the specified string.

方法继承

此类从以下类继承了上面列出的方法

  • java.lang.Object

转载于:https://my.oschina.net/u/589247/blog/113856

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值