Well, I do not think you necessarily have to be....is there a way to do something like IllegalArgumentException()? Or call something like that without it being after the parameter of the method?

Ok will do

In case anyone else refers back to this post for any information.

The correct way to fix my scenario and call the exception was..

throw new IllegalArgumentException("Invalid Matrix Size");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.