boolean자료형 출력-VariableBoolean01.java

CODEDRAGON Development/Java

반응형

boolean자료형 출력

   

   

소스코드

  1.  public class VariableBoolean01 {
  2.    
  3.         public static void main(String[] args) {
  4.                  
  5.                 //boolean자료형은 true/false 저장가능
  6.                 boolean b1=true;
  7.                 boolean b2=false;
  8.                  
  9.                 System.out.println(b1);
  10.                 System.out.println(b2);
  11.                  
  12.                 //연산의 결과에 의한 true/false출력
  13.                 System.out.println(7<10);
  14.                 System.out.println(7>10);
  15.    
  16.         }
  17. }


   

   

출력결과

   

반응형