为什么+hobby前面一定要加个""?否则就报错。。。
public class HelloWorld{
public static void main(String[] args) {
String hobby ="慕课网";
System.out.println(""+hobby);
hobby="我在慕课网";
System.out.println(""+hobby);
}
}
public class HelloWorld{
public static void main(String[] args) {
String hobby ="慕课网";
System.out.println(""+hobby);
hobby="我在慕课网";
System.out.println(""+hobby);
}
}
2019-03-28
举报