yes,my question hasnt queit been answered , i would like to know if there is a simpler way of making a loop with java.util.InputMismatchException in try.
somthing that doesn't involve any complexed...
Type: Posts; User: itayj
yes,my question hasnt queit been answered , i would like to know if there is a simpler way of making a loop with java.util.InputMismatchException in try.
somthing that doesn't involve any complexed...
well, i didnt understand this code since the only import i know is java.util.* :P
this is a lot more complexed then i thought it would be i think i will pass since i cant understand most of this code
you do not understand the problem
it has nothing to do with the loop.
try running it yourself
you will get this output if u will enter any other type of input then int:
Intput Error !
Intput...
i want the loop to keep going until the right type of input will be inseted
if i remove flag=true; there is no need for a loop since it will be over the first time
iv writen this code in order to prevent an unexpected ending of program in case there is an input mismatch
static int smartInputInt ()
{
boolean flag=true;
int end=-10;
while (flag)...