//Method can also be void //String parameter can be removed public boolean checkParam(boolean condition, String msg){ if(!condition) throw new IllegalArgumentException(msg); return true; }