inblog logo
|
An's Blog
    JAVA

    [JAVA] 10. 논리연산자

    윤설안's avatar
    윤설안
    Feb 04, 2025
    [JAVA] 10. 논리연산자
    Contents
    결과
    💡
    %% (and) = 둘 다 참이여야 참
    || (or) = 하나라도 참이면 참
    ! (not) = 그냥 거짓
    public class Logical2 { public static void main(String[] args) { // %%(and), ||(or) !(not) boolean a = true; boolean b = false; System.out.println(a && b); // false System.out.println(a || b); // true System.out.println(a && !b); // true } }

    결과

    notion image
     
    Share article
    Contents
    결과

    An's Blog

    RSS·Powered by Inblog