Method in a try-catch

  • 5
  • Locked
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.
You can't complete this task, because you're not signed in.