Exception handling
This code throws what programmers call a null-pointer exception. This is fixed by adding "try" in front of the code that might throw the exception, like is done with the code shown below: