forked from wuhujun/git
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest.java
More file actions
52 lines (51 loc) · 1.07 KB
/
Test.java
File metadata and controls
52 lines (51 loc) · 1.07 KB
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
47
48
49
50
51
52
public class Test{
public static void main(String args[]){
int i= 5;
if(i!=10){
double avg = 565 ;
System.out.println(avg);
}
else if(i!=5){
double avg = 78 ;
System.out.println(avg);
}
else{
System.out.println("else");
}
int test_no = 86;
if(test_no>100){
System.out.println("b>100");
}else if(test_no>90){
System.out.println("90<b<100");
} else if( test_no>80){
System.out.println("80<b<90");
}else if(test_no>70){
System.out.println("70<b<80");
}else {
System.out.println("b=<70");
}
int b = 90;
Integer ia = new Integer(45);
System.out.println(ia.equals(45));
String a = "ABCDEFG";
System.out.println(a.substring(0,1));
System.out.println(a.substring(0,2));
System.out.println(a.substring(1,3));
System.out.println(a.substring(5,7));
for( i =0 ; i!=10 ;i++){
System.out.println(i);
if(i==5){
break ;
}
}
for(i =0 ; i!=10 ;i++){
for(int j= 0 ;j!=10 ;j++){
System.out.println(i*j);
if(3==j){
System.out.println("break");
break ;
}
}
}
}
}