Each of you at least once in your life has probably entered a password or other text incorrectly. Let's protect a program from accidentally entering "incorrect" data. In this task, the user enters numbers from the keyboard. If he or she enters something else, then an exception-catching method should be triggered and display all previously entered numbers.
Method in a try-catch
You must be signed in to leave a comment
10 March, 12:40
Maybe I got a misunderstanding, but I think the second requirement is misleading. Completing this task requires to change the main method.