package com.study.javastudy.study;

public class OperatorExam5 {
    public static void main(String[] args) {
        boolean b1 = true;
        boolean b2 = false;
        boolean b3 = true;

        System.out.println(b1 && b2); // false
        System.out.println(b1 && b3); // true
        System.out.println(b1 || b2); // true
        System.out.println(b1 || b3); // true
        System.out.println(b2 || b2); // false

        int score = 88;
        if (score <=100 && score >=70){
            System.out.println("성공");
        } else {
            System.out.println("실패");
        }

        System.out.println(b1 ^ b3); // false
        System.out.println(b1 ^ b2); // true
        System.out.println(!b1); // false
    }
}

'자바 기초' 카테고리의 다른 글

switch 조건문  (0) 2024.01.26
삼항연산자  (0) 2024.01.26
if 조건문  (0) 2024.01.26
연산자 우선순위  (1) 2024.01.26
비교연산자  (0) 2024.01.26

+ Recent posts