1、java編譯報錯
error: reached end of file while parsing
2、出現這種報錯的原因是括號沒有成對,檢查源代碼:
補全括號,保存退出:
3、再次編譯、執行
[root@centos7 test5]# ls test.java [root@centos7 test5]# javac test.java [root@centos7 test5]# ls Shuffle1.class test.java [root@centos7 test5]# java Shuffle1 a-b c-d[root@centos7 test5]#
沒有問題。