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

Karteikarten

Exception Handling

Nathan Hunsdale Programming 2 Masters of Science Englisch 34 Karten

Karten in diesem Stapel (34)

  1. 1An exception is an indication of a _____ that occurs during the execution of a programproblem
  2. 2Exception Handling enables you to create applications that can _____ exceptionsresolve
  3. 3Exception handling allows a program to keep running as if no significant _____ has been encountered.problem
  4. 4Try Catch An uncaught exception is one where there is no _____ block to catch the error and may result in program terminationcatch
  5. 5Try Catch Flow After the exception has been handled, the program resumes after the last _____ block. This is known as the _____ _____ of _____ _____catch
    termination model of exception handling
  6. 6What is the difference between the try block and the try statement?The try block only contains what is in the block of curly brackets but the try statement includes all of the code, including try, catch, and finally code
  7. 7Variable Scope Are variables declared in the try block available in the catch block?No
  8. 8Checked vs Unchecked Exceptions The Java compiler enforces a catch-or-declare requirement for _____ exceptionsChecked
  9. 9Checked vs Unchecked Exceptions An exception's _____ type determines whether it's checked or uncheckedtype
  10. 10Checked vs Unchecked Exceptions All exception types that are direct or indirect subclasses of class RuntimeException are _____ exceptionsunchecked
  11. 11Checked vs Unchecked Exceptions Checked Represent invalid conditions in areas _____ the immediate control of the programoutside
  12. 12Checked vs Unchecked Exceptions Checked Are subclasses of the _____ classException
  13. 13Checked vs Unchecked Exceptions Checked All classes that are inherited from class Exception but not class _____ are considered to be checked exceptionsRuntime
  14. 14Checked vs Unchecked Exceptions Checked A method is required to somehow _____ a checked excpetionhandle
  15. 15Checked vs Unchecked Exceptions Checked If the complier sees that a checked exception has occurred, it _____ it or declares it in a _____ clausecaught it or declares it in a throws clause
  16. 16Checked vs Unchecked Exceptions Checked They will either add a _____/_____ block or add a _____ declarationtry/catch or throw
  17. 17Checked vs Unchecked Exceptions Unchecked The Java compiler (does/does not) check to determine whether an unchecked exception has been caught or declareddoes NOT
  18. 18Checked vs Unchecked Exceptions Unchecked These can be prevented by _____ coding. e.g. Validating a variable _____ it is used to perform an actionproper
    before
  19. 19Checked vs Unchecked Exceptions Unchecked Unchecked Exceptions (are/are not) required to be listed in a methods throw clause. Even if they are, it is not required that such exceptions be caught by an application.ARE NOT
  20. 20Checked vs Unchecked Exceptions Obtaining data from an Exception Object Exceptions derive from the _____ classThrowable
  21. 21Checked vs Unchecked Exceptions Obtaining data from an Exception Object Class Throwable offers _____ method that outputs the stack to the standard error streamprintStackTrace()
  22. 22Checked vs Unchecked Exceptions Obtaining data from an Exception Object Class Throwable getStackTrace- What does it do?Retrieves the stack trace information that might be printed by printStackTrace()
  23. 23Checked vs Unchecked Exceptions Obtaining data from an Exception Object Class Throwable getMessage() - What does it do?Returns the descriptive String store in an exception
  24. 24Checked vs Unchecked Exceptions Finally Block An ideal place to release _____ acquired in a try block, which helps eliminate resource leaksresources
  25. 25Checked vs Unchecked Exceptions Catching more than 1 type of Exception What is the exception?InputMistmatchException
  26. 26Using the Throws Clause It specifies the _____ that the method throwsexceptions
  27. 27Try-with try(Scanner sc = new Scanner(System.in);) What does this do?Closes the scanner on completion of the try block
  28. 28Throws If a method is called and the throws clause stated for that method is used then the exception is thrown back to the _____ which called itmethod
  29. 29Creating Your Own Exceptions A new exception must extend the _____ classException
  30. 30Rethrowing Exceptions Exceptions are rethrown when a catch block decides it cannot _____ that exceptionprocess
  31. 31Rethrowing Exceptions Rethrowing Exceptions defers the exception handling to _____ catch blockanother
  32. 32Logging What is this?Writing log messages during the execution of a program to a central place
  33. 33Logging Which package is it contained in?java.util.logging
  34. 34Logging Which class is it contained in?Logger

Informationen

Beschreibung
Masters of Science Programming 2 Karteikarten am Exception Handling, erstellt von Nathan Hunsdale am 02/06/2014.
Erstellt von
Nathan Hunsdale
Aufrufe
15
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck