In Java, we handle exceptions using try catch blocks. I know that I can write a try catch block like the one below to catch any exception thrown in a method.
Show the friendly message from within the catch block.
catch