티스토리 뷰

Java/Class

[java.lang] Boolean

MinChyang 2018. 1. 10. 09:43

Boolean Class



◎ Define


- Boolean은 참과 거짓을 의미하는 데이터 타입으로 bool 이라고도 부른다. 참을 의미하는 true, 거짓을 의미하는 false 두 가지의 값을 가지고 있다.


- Boolean Class는 객체형(Reference Type) 데이터 타입이고, boolean 변수는 기본형(Primitive Type) 데이터 타입이다.



◎ Wrapper Class Structure






◎ Boolean Class Field


Field

Brief description

public static final Boolean FALSE

기본형 false에 해당하는 Boolean Object 객체 반환

public static final Boolean TRUE

기본형 true에 해당하는 Boolean Object 객체 반환

 public static final Class<Boolean> TYPE

 기본형 boolean을 나타내는 Class 객체 반환



◎ Boolean Class Constructor


Constructor

Brief description

Boolean(String string)

String에 해당되는 boolean 값을 가진 Boolean 인스턴스 생성

Boolean(boolean value)

value 값을 가진 새로운 Boolean 인스턴스 생성



◎ System Class Method


Method

Brief description

public boolean booleanValue()

Boolean 인스턴스의 true or false 값을 반환

public static boolean parseBoolean(String s)

s를 boolean 값으로 변환

public static boolean valueOf(String s)

 s가 "true"일 경우 Boolean.TRUE, 그렇지 않을 경우 Boolean.FALSE 반환

public static boolean valueOf(boolean b)

b가 true일 경우 Boolean.TRUE, 그렇지 않을 경우 Boolean.FALSE 반환



◎ Explanation


① Wrapper Class, Primitive Type, Reference Type은  http://minca.tistory.com/8 이곳을 참조하자.


'Java > Class' 카테고리의 다른 글

[java.lang] Number  (0) 2018.01.10
[java.lang] Character  (0) 2018.01.10
[java.util] StringTokenizer  (0) 2018.01.08
[java.lang] System  (0) 2018.01.05
[java.lang] Wrapper  (0) 2018.01.05
댓글
Notice
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
Link
«   2025/04   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30
글 보관함