I suppose saying that it will revert wasn't quite right. If there is a mismatch then the Scanner won't advance to the next input and, in this case, keep using a non-integer value causing an infinite...
Type: Posts; User: KucerakJM
I suppose saying that it will revert wasn't quite right. If there is a mismatch then the Scanner won't advance to the next input and, in this case, keep using a non-integer value causing an infinite...
I take it that the method getRectangle() is used inside of a loop, possibly in the main() method? Seeing the actual loop would probably help and I find it curious that you only catch the exception...