-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLogical1.java
More file actions
27 lines (23 loc) · 805 Bytes
/
Copy pathLogical1.java
File metadata and controls
27 lines (23 loc) · 805 Bytes
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
package operator;
public class Logical1 {
public static void main(String[] args) {
System.out.println("&&: AND 연산");
System.out.println("true && true");
System.out.println("true && false");
System.out.println("false && false");
System.out.println("||: OR 연산");
System.out.println("true || true");
System.out.println("true || false");
System.out.println("false || false");
System.out.println("! 연산");
System.out.println(!true);
System.out.println(!false);
System.out.println("변수 활용");
boolean a = true;
boolean b = false;
System.out.println(a && b);
System.out.println(a || b);
System.out.println(!a);
System.out.println(!b);
}
}