mutiple markers at this line
public class HelloWorld2 {
?? ?public class Inner {
?? ??? ?public void show ( ) {
?? ??? ??? ?System.out.println ( "imooc" ) ;
?? ??? ?}
?? ?
?? ?}
?? ?
?? ?public static void main ( String [ ] args ) {
???
?? ??? ?public void print ( ) {? //這行提示mutiple markers at this line 哪里有問題啊
? ??? ???? HelloWorld2 hello = new HelloWorld2 ( ) ;
???? ? ? ? Inner i = hello.new Inner ( ) ;
??? ?? ?? i.show ( ) ;
?? ??? ?}
?? ??? ??? ??? ?
?? ?}
}
2017-02-27
出錯的那一行要刪掉去,函數內部不能再寫函數,main也是函數,所以會報錯。刪掉這一行和下面的一個右括號就可以運行了
2017-01-30
print是JAVA關鍵字,不能做方法名