为啥运行不出来结果呢,求大神指教
public class HelloWorld{ public static void main(String[] args) { String love = "我爱慕课网"; String web = "www.imooc.com"; System.out.println(love); System.out.println(web); } }
2016-01-30
public class HelloWorld{
public static void main(String[] args) {
String love = "我爱慕课网";//分号错误
String web = "www.imooc.com";
System.out.println(love);//分号错误
System.out.println(web);//分号错误
}
}
将你的代码放入Eclipse中后,发现3个错误,建议你使用Eclipse来避免一些简单的错误。
修正后:
public class HelloWorld{
public static void main(String[] args) {
String love = "我爱慕课网";//正确
String web = "www.imooc.com";//正确
System.out.println(love);//正确
System.out.println(web);//正确
}
}举报