E:\>javac HelloWorld.java
HelloWorld.java:4: 错误: 进行语法分析时已到达文件结尾
}
^
1 个错误
这个错误哪个大神指点下
HelloWorld.java:4: 错误: 进行语法分析时已到达文件结尾
}
^
1 个错误
这个错误哪个大神指点下
2019-09-03
equals与==用法、功能基本相同,但如果是基本类型比较,只能用==来比较,不能用equals,如果是基本类型的包装类型(比如Boolean、Character、Byte、Shot、Integer、Long、Float、Double),那么用equals。
2019-09-03
对于算术运算,不能使用18<age<=40这种描述,要用18<age && age<=40
2019-09-03
public class HelloWorld {
public static void main(String[] args) {
int one = 21 ;
if(one%2==0){
System.out.println("one是偶数");
}else{
System.out.println("one不是偶数");
}
}
}
public static void main(String[] args) {
int one = 21 ;
if(one%2==0){
System.out.println("one是偶数");
}else{
System.out.println("one不是偶数");
}
}
}
2019-09-01
public class HelloWorld{
public static void main(String[] args) {
String iLove="我爱慕课网";
String myHttp="www.imooc.com";
System.out.println(iLove+",地址是:"+myHttp);
}
}
public static void main(String[] args) {
String iLove="我爱慕课网";
String myHttp="www.imooc.com";
System.out.println(iLove+",地址是:"+myHttp);
}
}
2019-08-31
int num = 0;
int math = 50;
do{
num+= math;
math-=2;
} while (math > 0);
System.out.println("50以内的偶数之和为:"+num);
int math = 50;
do{
num+= math;
math-=2;
} while (math > 0);
System.out.println("50以内的偶数之和为:"+num);
2019-08-29