import java.io.*; public class Erind3{ public static void main(String argumendid[]){ boolean korrata=true; while(korrata){ try{ BufferedReader sisse=new BufferedReader( new InputStreamReader(System.in) ); System.out.println("Palun number:"); String rida=sisse.readLine(); int nr=Integer.parseInt(rida); System.out.println("Number "+nr+" sisestati korralikult."); korrata=false; } catch (IOException sisendierind){ System.out.println("Probleem klaviatuuriga"); korrata=false; } catch (NumberFormatException numbriformaadierind){ System.out.println("Valesti sisestatud number. "+ numbriformaadierind.getMessage()+ "\n Proovi veel!"); } } } }