I am developing code in which i need user must enter all the inputs and compiler should throw exception after taking all inputs and do not close program execution abruptly.
Lets say I have to take 4 num inputs from user and at 2 nd input line user enters char then java should take another two inputs and only after that throw an exception
eg: 1 2 @ 4
Number mismatch exception
Reply asap