Method in a try-catch

  • 6
  • 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.
Comments (1)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Matar29
Level 12 , Italy
Expert
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.