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