public class HelloWorld {
public static void main(String[] args) {
int age=25;
if (age>=60){
System.out.println("老年");
}else if (age>=40){
System.out.println("中年");
}else if(age >= 18){
System.out.println("少年");
}else{
System.out.println("同年");
}
}
}
public static void main(String[] args) {
int age=25;
if (age>=60){
System.out.println("老年");
}else if (age>=40){
System.out.println("中年");
}else if(age >= 18){
System.out.println("少年");
}else{
System.out.println("同年");
}
}
}
2021-12-03
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-12-03
我这个作业完成的还可以吧,嘻嘻
public class HelloWorld{
public static void main(String[] args) {
String aidou="易烊千玺";
String simida="思密哒";
System.out.println("我爱你"+aidou+simida);
}
}
public class HelloWorld{
public static void main(String[] args) {
String aidou="易烊千玺";
String simida="思密哒";
System.out.println("我爱你"+aidou+simida);
}
}
2021-12-01
public class HelloWorld{
public static void main(String[] args) {
String ohNo="我爱慕课网";
String mukeWeb="www.imooc.com";
System.out.println (ohNo);
System.out.println (mukeWeb);
}
public static void main(String[] args) {
String ohNo="我爱慕课网";
String mukeWeb="www.imooc.com";
System.out.println (ohNo);
System.out.println (mukeWeb);
}
2021-12-01
编码:public class HelloWorld{
public static void main(String[] args) {
String onpe="我爱慕课网";
String javaweb="www.imooc.com";
System.out.println (onpe);
System.out.println (javaweb);
}
}
public static void main(String[] args) {
String onpe="我爱慕课网";
String javaweb="www.imooc.com";
System.out.println (onpe);
System.out.println (javaweb);
}
}
2021-12-01
public class HelloWorld{
public static void main(String[] args) {
final Char MAN='男';
final Char WOMAN='女';
System.out.plintln("MAN");
System.out.plintln("WOMAN");
}
}
public static void main(String[] args) {
final Char MAN='男';
final Char WOMAN='女';
System.out.plintln("MAN");
System.out.plintln("WOMAN");
}
}
2021-11-26
应该使用do......while吧,do{count++;num/=10;}while(num!=0)
不然当num=0时,返回结果回事输入错误
不然当num=0时,返回结果回事输入错误
public class HelloWorld{
public static void main(String[] args) {
string hobby1="我爱慕课网";
string hobby2="www.imooc.com";
System.out.println(hobby1);
System.out.println(hobby2);
}
}
哪里出错
public static void main(String[] args) {
string hobby1="我爱慕课网";
string hobby2="www.imooc.com";
System.out.println(hobby1);
System.out.println(hobby2);
}
}
哪里出错
2021-11-21
现在IDEA很好了,集成了jdk自动下载, 就是你只需要下载idea,然后可以在IDEA里面下载JDK自动安装,环境配置什么都不用搞
2021-11-19