Professional Documents
Culture Documents
Intermediate-Programming - Coding - Debugging
Intermediate-Programming - Coding - Debugging
INTERMEDIATE PROGRAMMING
MW 2:30 - 4:00 pm
1. Java Introduction
Process/Debugging Output
1.5.3. Increment and Decrement Operators
Program errors
LINE 7: Variable resultnum2 is never written to
LINE 9: unexpected type
LINE 11: illegal start of expression
LINE 14: <identifier> expected
LINE 16: variable resultnum2 might not have been initialized
Process/Debugging Output
1.5.4. Java instanceof Operator
Program errors
Line 7: missing method body, initializer can be static
LINE 8: Empty character literal
Line 9: variable result is never read
Line 11: empty statement
Line 12: as of release 9’_’ is a keyword, and may not be used as an identifier
Process/Debugging Output
1.5.5. Java Ternary Operator
Program errors
LINE 10: Variable februaryDays is never read
LINE 11: Illegal start of expression
LINE 13: : expeted
LINE 13: incompatible types int cannot be converted to boolean
LINE 14: void cannot be dereferenced
Process/Debugging Output
o 1.6 Java Input and Output
Reference:
https://www.programiz.com/java-programming/examples