C
cb1997
Unregistered / Unconfirmed
GUEST, unregistred user!
程序代码如下:
import javax.swing.JFrame;
public class NineSquares {
public static void main( String args[]) {
JFrame = myFrame = new JFrame("Nine Squares"
myFrame.setVisible(true);
myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
错误如下:
firstone/NineSquares.java:7: illegal character: /160
?public static void main( String args[])
^
firstone/NineSquares.java:9: illegal character: /160
??JFrame = myFrame = new JFrame("Nine Squares"
^
firstone/NineSquares.java:9: illegal character: /160
??JFrame = myFrame = new JFrame("Nine Squares"
^
firstone/NineSquares.java:10: illegal character: /160
??myFrame.setVisible(true);
^
firstone/NineSquares.java:10: illegal character: /160
??myFrame.setVisible(true);
^
firstone/NineSquares.java:11: illegal character: /160
??myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
^
firstone/NineSquares.java:11: illegal character: /160
??myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
^
firstone/NineSquares.java:12: illegal character: /160
?}
^
firstone/NineSquares.java:13: <identifier>
expected
}
^
9 errors
可我检查好象没有什么地方是错误的啊!
那位帮忙解释一下啊!
我初学java
import javax.swing.JFrame;
public class NineSquares {
public static void main( String args[]) {
JFrame = myFrame = new JFrame("Nine Squares"
myFrame.setVisible(true);
myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
}
错误如下:
firstone/NineSquares.java:7: illegal character: /160
?public static void main( String args[])
^
firstone/NineSquares.java:9: illegal character: /160
??JFrame = myFrame = new JFrame("Nine Squares"
^
firstone/NineSquares.java:9: illegal character: /160
??JFrame = myFrame = new JFrame("Nine Squares"
^
firstone/NineSquares.java:10: illegal character: /160
??myFrame.setVisible(true);
^
firstone/NineSquares.java:10: illegal character: /160
??myFrame.setVisible(true);
^
firstone/NineSquares.java:11: illegal character: /160
??myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
^
firstone/NineSquares.java:11: illegal character: /160
??myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
^
firstone/NineSquares.java:12: illegal character: /160
?}
^
firstone/NineSquares.java:13: <identifier>
expected
}
^
9 errors
可我检查好象没有什么地方是错误的啊!
那位帮忙解释一下啊!
我初学java