Boolean

이상해씨·2023년 4월 25일
0

JAVA

목록 보기
7/40

불린(boolean)

  • 데이터를 이분화하여 반환
  • on/off, 0/1, True/False
//기본 사용법
boolean isT = true;
boolean isF = false;
System.out.println(isT);     // true
System.out.println(isF);   // false

//조건
int a =10;
int b = 5;

System.out.ptintln(a>b); //True
System.out.ptintln(a<b); //False

System.out.ptintln(10<5); //False
System.out.ptintln(a=19); //False
System.out.ptintln(10=15); //False

참고

profile
공부에는 끝이 없다

0개의 댓글