Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 40121

Making sure user inputs all input before thrwing exception

$
0
0

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


Viewing all articles
Browse latest Browse all 40121

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>