Hello, I'm new in Java programming, just learning it and I want to ask you about the Exceptions. As much as I understood, I just need to create a class e.g. "MyException" that extends the Exception class, and use the exception specification "throws" in the function that might throw the particular exception, and after that throw the exception inside the function. I also read about " try" and "catch ", but what I can't get clear in my mind is the following: Do I need to write in the class "MyException" that e.g. if something doesn't happen, only then throw the exception... or the compiler will know when to throw the exception... I really don't get it. If I don't want the user to be able to insert integers in the file, just String, do I specify this somewhere, or just write "try" and "catch(Exception e)" ?