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
安装了JDK 和Idea之后是不是Maven已经安装好了呀?我需要Maven,老师给我们的任务。但是我偶尔在Idea中看到了Maven,是我已经不用安装了吗?谢谢
2021-03-25
int one = 1;
if (one % 2 == 0) {
System.out.println("one是偶数");
}else
System.out.print("one是奇数");
}
}
if (one % 2 == 0) {
System.out.println("one是偶数");
}else
System.out.print("one是奇数");
}
}
2021-03-25