Table of contents
It’s easy to make mistakes when learning Java for beginners
4.java: error: symbol not found
5.java: Error: End of file reached while parsing
Errors that are difficult to correct are business logic errors and environmental errors.
It’s easy to make mistakes when learning Java for beginners
1.javac: File not found:
Solution:
1. The source file name does not exist or is written incorrectly.
2. The current path is wrong
3. Check file extension
2.java: Error class
Solution:
The file name and public class name must be consistent
3.java: Error: ';' required
Solution:
Compilation fails. Pay attention to the number of lines where the error occurs, and then correct the error at the specified location in the source code.
4.java: error: symbol not found
Solution:
If a word is spelled incorrectly, go to the specified location in the source code to correct it.
5.java: Error: End of file reached while parsing
Solution:
Pay attention to whether there is no '}' at the end