int three=two+one;
System.out.println(three);
报错;把int删了就可运行了???
System.out.println(three);
报错;把int删了就可运行了???
2021-04-10
老师我觉得我这个写法也是可以的,但是慕课里面不采用
public class Helloworld {
public static void main(String[] args) {
final char SEX='男';
final char SAX='女';
System.out.println("NIHAO"+SEX);
System.out.println("NIN"+SAX);
}
}
public class Helloworld {
public static void main(String[] args) {
final char SEX='男';
final char SAX='女';
System.out.println("NIHAO"+SEX);
System.out.println("NIN"+SAX);
}
}
2021-04-08
public class HelloWorld {
public static void main(String[] args) {
int score = 94;
String sex = "女";
if(score>80){
if(sex.equals("女")){
System.out.println("进入女子组决赛");
}
else{
System.out.println("进入男子组决赛");
}
}
else{
System.out.println("淘汰");
}
}
}
public static void main(String[] args) {
int score = 94;
String sex = "女";
if(score>80){
if(sex.equals("女")){
System.out.println("进入女子组决赛");
}
else{
System.out.println("进入男子组决赛");
}
}
else{
System.out.println("淘汰");
}
}
}
2021-03-30