In trying to debug a section of code today, I discovered I had written this:
if (testHand[iThread].wasThreadInterrupted()) throw(new InterruptedException());
instead of:
if (testHand[iThread].wasThreadInterrupted()) throw new InterruptedException();
Interestingly this compiled and ran with no problems, but probably wasn't doing what I intended. I've searched for a throw method, but haven't found one - is this some bad way of throwing an exception..why did it compile?