我照着左边的例子来的啊。怎么出错了呢?
public class HelloWorld{
public static void main(String[] args){
String hobby = "慕课网";
System.out.println("变量hobby的内容是:"+hobby);
hobby = "我爱慕课网";
System.out.println("重新复制后变量hobby的内容是:"+hobby);
}
}
很明显的少了2个“”
System.out.println("变量hobby的内容是:" + hobby);
System.out.println("重新赋值后变量hobby的内容是:" + hobby);