Checking for $ entries without using try and catch
I am fairly new to Java and I am looking for a way to ensure that the users input is valid. Since I am not really familiar wiht try and catch, I do not want to use it.
I tried several things but with no luck. I want to ask the user for how much money s/he has (money = Integer.parseInt(stdin.readLine());) and then make sure s/he can only enter a valid format ( I tried using fmt.format) but it didnt work.