I have the following java code: how can I set e.getMessage() so that System.out.println(e.getMessage()) will print “Pretty please enter an int: ” Answer You only set the message when the exception is created, it’s an argument to the constructor. In your case it would have been nice if the In…