コードをそのままコンパイルしたときに表示されるエラーは以下になります。
text
1./Playground/Sample1.java:1: error: class, interface, or enum expected
2Class Kuku
3^
4./Playground/Sample1.java:4: error: class, interface, or enum expected
5void show(){
6^
7./Playground/Sample1.java:5: error: illegal character: '\uff1c'
8for(int i=1;i<10;i++){
9 ^
10./Playground/Sample1.java:5: error: class, interface, or enum expected
11for(int i=1;i<10;i++){
12 ^
13./Playground/Sample1.java:6: error: illegal character: '\uff1c'
14for(int j=1;j<10;j++){
15 ^
16./Playground/Sample1.java:6: error: class, interface, or enum expected
17for(int j=1;j<10;j++){
18 ^
19./Playground/Sample1.java:8: error: class, interface, or enum expected
20System.out.print(i+″×″+j+″=″+k+″¥t″);
21^
22./Playground/Sample1.java:8: error: illegal character: '\u2033'
23System.out.print(i+″×″+j+″=″+k+″¥t″);
24 ^
25./Playground/Sample1.java:8: error: illegal character: '\u00d7'
26System.out.print(i+″×″+j+″=″+k+″¥t″);
27 ^
28./Playground/Sample1.java:8: error: illegal character: '\u2033'
29System.out.print(i+″×″+j+″=″+k+″¥t″);
30 ^
31./Playground/Sample1.java:8: error: illegal character: '\u2033'
32System.out.print(i+″×″+j+″=″+k+″¥t″);
33 ^
34./Playground/Sample1.java:8: error: illegal character: '\u2033'
35System.out.print(i+″×″+j+″=″+k+″¥t″);
36 ^
37./Playground/Sample1.java:8: error: illegal character: '\u2033'
38System.out.print(i+″×″+j+″=″+k+″¥t″);
39 ^
40./Playground/Sample1.java:8: error: illegal character: '\u2033'
41System.out.print(i+″×″+j+″=″+k+″¥t″);
42 ^
43./Playground/Sample1.java:9: error: class, interface, or enum expected
44}
45^
46./Playground/Sample1.java:10: error: illegal character: '\u2033'
47System.out.print(″¥n″);
48 ^
49./Playground/Sample1.java:10: error: illegal character: '\u2033'
50System.out.print(″¥n″);
51 ^
52./Playground/Sample1.java:11: error: class, interface, or enum expected
53}
54^
5518 errors
Javaの文法として class
, interface
, enum
(全て小文字)のどれかが期待される場所なのですが、それに当てはまらないものがあるので文法エラーになっています。
./Playground/Sample1.java:1: error: class, interface, or enum expected
Class Kuku
^
'\uff1c'
は全角文字の「<」になっていて、これは演算子 <
とは異なるため文法エラーです。
./Playground/Sample1.java:5: error: illegal character: '\uff1c'
for(int i=1;i<10;i++){
^