title: Exception handling when dealing with user input for a beginner
body: <p>I have to do a little program based in a shop, I have to add new clients to the shop customer collection, new items to the shop stock, edit them etc, so I use user input(scanner) to create this new objects. I have all the methods I need for this already without exceptions.</p>
  
  <p>I would like some simple java exception handling for when the user introduces a string were he is supposed to enter a integer or viceversa. 
  For example if I'm executing a method to create a item for the shop and when I ask the user to introduce the stock(integer) the user types hello instead of a number the program crashes, I would like to handle the exception, show a error message, don't create the object and relaunch the item creation method from the beggining(or relaunch the submenu it was right before)</p>
  
  <p>should I use try and catch? the method in try, when it fails catch throws message of error and relaunches the item creation menu? How should i do this? I've been searching and found a interesting method for integers here:
  <a href="https://stackoverflow.com/questions/41050343/exception-handling-for-no-user-input-in-java">Exception Handling for no user input in Java</a></p>
  
  <p>The problem is I don't know how I could handle possible exceptions for when introducing the ID for the user(which would be a string composed of 8 numbers and a letter like for example:  13234354A, so how could I show a error if a user introduces "sjadsjasdj" as a ID instead of something sort of realistic ) or some other things like handling exceptions for a few enum or boolean variables I use when creating this objects.</p>
  
  <p>I've been looking in this site and searching google but I haven't found what I need or are more complex than what I understand with my little knowledge, also English is not my native language so my searches may be a little off.</p>
  
  <p>Thanks for your time!</p>