public class HelloWorld{
???
???
??? public static void main(Char[] args) { char hobby="慕";
?System.out.println(+hobby);
hobby="慕課網(wǎng)";
System.out.println(+hobby);}
}請問錯哪了

備戰(zhàn)考級的蘇海明
2014-10-04
3 回答
舉報
0/150
提交
取消
2014-10-10
hobby="慕課網(wǎng)";改為String?hobby="慕課網(wǎng)";
(+hobby);都改成(hobby);試試
2014-10-04
+去掉
2014-10-04
error: bad operand type String for unary operator '+'
System.out.println(+hobby);} }
?????????????????? ^
1 error