-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOperator java
More file actions
44 lines (24 loc) · 819 Bytes
/
Operator java
File metadata and controls
44 lines (24 loc) · 819 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.program;
public class cOperator {
public static void main(String[] args) {
//OPERATOR
//PENEGASAN
// int bilangan=10;
//aritmatika +, - , * , /, %, ++, --, +=, -=
// int bil1 = 14,
// bil2 = 7,
// hasil = bil1 + bil2;
// bil1+=100;
// bil2 -=5;
//pembanding <, >, <=, >= , ==, !=
// int bil1 = 12 ,bil2 = 10;
// boolean hasil = bil1> bil2;
//logika &&, ||, !
int totalBayar = 150000;
boolean atm = true;
boolean hasil = totalBayar <=150000 && atm == true;
hasil = ! hasil;
hasil = ! hasil;
System.out.println(hasil);
}
}