这样编辑怎么也是错误的
ic class HelloWorld{
public static void main(String[] args) {
String a="我爱慕课网";
String b="www.imooc.com";
String.out.println(a+"\n"+b);
}
}
ic class HelloWorld{
public static void main(String[] args) {
String a="我爱慕课网";
String b="www.imooc.com";
String.out.println(a+"\n"+b);
}
}
2015-08-12
Syntax error on token "Invalid Character", ; expected 非法字符“;”为全角
out cannot be resolved or is not a field,这行新手理解起来可能比较困难,提示没有找到out(属性)。System打成String,运行时会调用System类下的out,实际上out是个Static类型内部类。在调用out.println(..);
public static void main(String[] args) { String a = "我爱慕课网"; //分号半角,Syntax error on token "Invalid Character", ; expected String b = " //分号半角 System.out.println(a + "\n" + b); // String.out.println(a+"\n"+b);提示out cannot be resolved or is not a field, }
举报