hello wonderful people of java land
i am writing a program and trying to check to make sure some of my inputs are valid integers. i was told that i needed to read into exception handeling and now that i have done so i think i know what i have to do but i would just like to check with some of you experts and make sure i am going to do the right thing
pesudo code:
try block
-get inputs from user
-store inputs into a type int
catch - if exception is thrown for a not valid conversion
-output to user that the input was not valid
-re attempt input //QUESTION here how do i go back to the catch block can i
have this in a loop or somthing
finally
-do the stuff i needed to do with the ints
thanks
eric
i am writing a program and trying to check to make sure some of my inputs are valid integers. i was told that i needed to read into exception handeling and now that i have done so i think i know what i have to do but i would just like to check with some of you experts and make sure i am going to do the right thing
pesudo code:
try block
-get inputs from user
-store inputs into a type int
catch - if exception is thrown for a not valid conversion
-output to user that the input was not valid
-re attempt input //QUESTION here how do i go back to the catch block can i
have this in a loop or somthing
finally
-do the stuff i needed to do with the ints
thanks
eric
Comment