:3
| Error Type | Compiler Error (If applicable) | Description of Problem | Solution | Date |
| Syntax | Error: This method must return a result of type char | An accessor method (pop()) which returns a char, generates an error when compiled. | The method must return something, in any instance it runs. In pop(), it would only return a char if an IF part of an IF-ELSE statement was executed. The solution was to modify the ELSE statement to also return a char, so regardless if the IF or the ELSE statement was executed or not, the method would still return a char. | 04/10/2011 |
| Logic | Error: java.lang.NumberFormatException: For input string: "i" | A main method which reads lines from a file and outputs integers, generates an error when ran. | The error was caused by trying to parse something into a memory type which it could not be stored in. In this particular case, a string "i" was being parsed into an integer, due to an error in the algorithm. The solution was to adjust the algorithm accordingly to avoid any possibility of parsing something into an incorrect memory type. | 20/10/2011 |
| Logic | Error: java.lang.NullPointerException | A main method which reads lines from a file and outputs integers, generates an error when ran. | The error was caused by trying to assign the string value 'null' to a StringTokenizer, which it cannot take. Like the above error, it is a logic/algorithm problem. The solution was to adjust the algorithm so there would never occur a situation where 'null' would be assigned to a StringTokenizer. | 20/10/2011 |
| Syntax | Error: Syntax error, insert ";" to complete LocalVariableDeclarationStatement | A statement where a variable was being declared was not denoted as finished by a semicolon. | Add a semicolon at the end of the statement to let the compiler understand that the variable declartion statement is complete. | 25/10/2011 |
| Syntax | Error: TEXT_FILE_OUTPUT cannot be resolved to a variable | While attempting to create a PrintWriter object, the compiler could not find the parameter given: 'TEXT_FILE_OUTPUT' | Caused by copying code from another class which had different variable names. The solution was to change the name of the parameter so it could be found. | 06/11/0211 |