改完记得run一下那个StyleCheck 改得老费劲了
Run java -jar checkstyle.jar -c styleFileSummer2021.xml YOURCODE.java > styleReport.txt
- Conditionals (if-else)
- Complex conditionals (nested if-else)
- Loops
- Nested loops
- User-defined methods
- User-defined methods with parameters
- User-defined methods with return values
- Use of additional libraries other than: PrintWriter and FileWriter, Math, String, Arrays, PrintWriter, PrintStream, File, or Scanner.
- 2D Arrays (or arrays of greater dimension)
- Object inheritance
- File Input
- Advanced Input validation: Check if users input their names
- Use of flags, sentinels, or semaphores, other than to simply determine if a loop should repeat or not.
- Example: A flag which indicates if a file is currently in use.
- Example: A special value which marks the end of a set of data.
- Use of try-catch to handle at least two checked exceptions so that your main method does not require a "throws" warning. Include a useful reaction.