Manually throw an exception

How would I manually throw an IndexOutOfBoundsException in Java and optionally print a message?

Leave a Comment