public class HelloWorld {
public static void main(String[] args) {
int one = 20 ;
if(one%2==0){
System.out.println("one是偶数");
}
}
}
public static void main(String[] args) {
int one = 20 ;
if(one%2==0){
System.out.println("one是偶数");
}
}
}
2020-03-02
https://blog.csdn.net/hdjbdbfj/article/details/104497700
https://blog.csdn.net/qq_41119146/article/details/103846095
https://blog.csdn.net/qq_41119146/article/details/103846095
2020-03-02
three=one+two;
System.out.println("three=one+two==>"+three);
three += one;
System.out.println("three+=one==>"+three);
three -= one;
System.out.println("three-=one==>"+three);
three *= one;
System.out.println("three=one+two==>"+three);
three += one;
System.out.println("three+=one==>"+three);
three -= one;
System.out.println("three-=one==>"+three);
three *= one;
2020-03-02
int score=94;
String sex="女";
if(score>80) {
if(sex.equals("女")) {
System.out.print("进入女子决赛");
} else {
System.out.print("淘汰");}
} else {
System.out.print("进入男子决赛");
}
}
}
String sex="女";
if(score>80) {
if(sex.equals("女")) {
System.out.print("进入女子决赛");
} else {
System.out.print("淘汰");}
} else {
System.out.print("进入男子决赛");
}
}
}
2020-02-29
public class HelloWorld {
public static void main(String[] args) {
int age=25;
if(age>=18) {
System.out.println("成年");
} else {
System.out.println("未成年");
}
}
}
public static void main(String[] args) {
int age=25;
if(age>=18) {
System.out.println("成年");
} else {
System.out.println("未成年");
}
}
}
2020-02-29
while(score<=60){
score++;
if(score==60){
break;
}
}
for(count=0;count<=7;count++){
if(count==7){
break;
}
}
上面三种方法都可以实现
score++;
if(score==60){
break;
}
}
for(count=0;count<=7;count++){
if(count==7){
break;
}
}
上面三种方法都可以实现