GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Karteikarten

Exception Handling

nhunsdale02 Programming I Masters Englisch 22 Karten

Karten in diesem Stapel (22)

  1. 1What is an exception?An event which occurs DURING THE EXECUTION OF A PROGRAM that disrupts the normal flow of the program's instruction
  2. 2Exceptions What happens in a method when an error occurs?The method creates an object and hands it off to the runtime system
  3. 3Exceptions What happens to the error object that is passed off and what is the exception object called?The EXCEPTION OBJECT takes information about the error including its type, and the state of the program when the error occurred
  4. 4Exceptions Creating an exception object and hanging it to the runtime system is called _____ _____ _____throwing an exception
  5. 5After a method throws an exception, the runtime system attempts to find something to _____ ithandle
  6. 6The call stack What is it?The sequence of method calls that lead to the exception
  7. 7Handling the exception The _____ system searches the call stack for a method that contains a block of code that can handle the exception. This block of code is called the _____ _____The RUNTIME system searches the call stack for a method that contains a block of code that can handle the exception. This block of code is called the EXCEPTION HANDLER
  8. 8The Call Stack The search begins with the method where the error occurred and works _____ from therebackwards
  9. 9The Call Stack When the appropriate handler is found, the runtime system passes the exception to the handler. An exception handler is considered appropriate if ...the type of the exception object thrown matches the type that can be handled by the handler
  10. 10Try/Catch Catch Block What is its function?It is an exception handler and handles the type of exception indicated by its argument
  11. 11Try/Catch Catch Block What does it take in its parameters?The exception type that it can handle
  12. 12Try/Catch Catch Block The Exception type must be the name of a class that extends _____Throwable
  13. 13Try/Catch Catch Block The handler can refer to the exception handler with _____name
  14. 14Try/Catch How can you display the error details to System.out?ex{or name of exception}.printStackTrace();
  15. 15Exceptions To handle numbers and equations, which exception would be the best to use?java.lang.ArithmeticException
  16. 16Exceptions Call an ArithmeticException and name it in a catch block :catch(java.lang.ArithmeticException ex)
  17. 17Exceptions Call a general exception in a catch block and name it :catch(Exception ex)
  18. 18Exceptions Which function do you use to get the message outputted by the exception handler?ex.getMessage();
  19. 19Try/Catch Finally When does it execute?After all the trys and catches
  20. 20Try/Catch Finally Will it execute even if an unexpected exception occurs?Yes
  21. 21Try/Catch Finally What is an amazing function it performs?Clean of of code and resources
  22. 22Exceptions Which exception handles user input exceptions?InputMissmatchException

Informationen

Beschreibung
Masters Programming I Karteikarten am Exception Handling, erstellt von nhunsdale02 am 05/06/2014.
Erstellt von
nhunsdale02
Aufrufe
15
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck