-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLogical.java
24 lines (20 loc) · 906 Bytes
/
Logical.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
public class Logical {
public static void main(String[] args)
{
int a=10;
int b=20;
int c=30;
System.out.println("Value of a==b && a<b && a<c = " + (a==b && a<b && a<c));
System.out.println("Value of a<b && a<c && b<c && a<=c = " + (a<b && a<c && b<c && a<=c));
System.out.println("Value of a==b || a<b || a>b = " + (a==b || a<b || a>b));
System.out.println("Value of !true is = " + !true);
System.out.println("Value of !(a==b) is = " + !(a==b));
}
}
/* OUTPUT-:
Value of a==b && a<b && a<c = false
Value of a<b && a<c && b<c && a<=c = true
Value of a==b || a<b || a>b = true
Value of !true is = false
Value of !true is = true
*/