Quiz: Errors
What happens with System.out.println(1 / 0)
?
- Doesn't compile
- Compiles, runs, prints wrong value
- Compiles, runs, prints error message
- Keyboard melts
Run the program in BlueJ to see the “ArithmeticException” and the explanation “/ by zero”.