-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathTest.java
More file actions
46 lines (41 loc) · 828 Bytes
/
Test.java
File metadata and controls
46 lines (41 loc) · 828 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
45
46
//验证
public class Test {
//编写一个main方法
public static void main(String[] args) {
// int x = 5;
// int y=5;
// if(x++==6 & ++y==6){ //逻辑与
// x = 11;
// }
// System.out.println("x="+x+",y="+y);
// //6, 6
// int x = 5,y = 5;
// if(x++==6 && ++y==6){
// x = 11;
// }
// System.out.println("x="+x+",y="+y);
// //6, 5
//
// int x = 5,y = 5;
// if(x++==5 | ++y==5){
// x =11;
// }
// System.out.println("x="+x+",y="+y);
//11, 6
//
// int x = 5,y = 5;
// if(x++==5 || ++y==5){
// x =11;
// }
// System.out.println("x="+x+",y="+y);
//11, 5
//
//
boolean x=true;
boolean y=false;
short z=46;
if( (z++==46)&& (y=true) ) z++;
if((x=false) || (++z==49)) z++;
System. out.println("z="+z); //50
}
}