10.2 Recognizing Exception Classes Flashcards

1
Q

What are the three key groups of exceptions in Java?

A

Error
UnCheckedException(RuntimeException)
CheckedException

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

πŸ“οΈ What is an UncheckedExceptions?

A
  • > Unchecked exceptions are RuntimeExceptions or any of its subclasses
  • > Exceptions that do NOT have to be anticipated (This is declared or handled)
  • > They can be thrown by the programmer or the JVM.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

πŸ“οΈ What are some common RuntimeException classes?

A
o ArithmeticException
o ClassCastException
o IllegalArgumentException
   └── NumberFormatException
o IndexOutOfBoundsException
   └── ArrayIndexOutOfBoundsException
o NullPointerException
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

πŸ“οΈ What are checked exceptions?

A
  • > CheckedExceptions is any Exception that is not a RuntimeException
  • > CheckedExceptions are checked at compile-time, this is it must be caught or declared
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

πŸ“οΈ What are some common checked exceptions?

A
o CloneNotSuportedExcetion
o InterruptedException
o IOException
o ReflectiveOperationException
o SQLException
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

πŸ“οΈWhat is an Error β€œexception”?

A
  • > Error means something went so horribly wrong that your program should not attempt to recover from it.
  • > They are thrown by the JVM and should NOT be handled or declared.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

πŸ“οΈ What are some common Error β€œexceptions”?

A
o AssertionError
o LinkageError
      └── ExceptionInInitializerError
o ThreadDeath
o VirtualMachineError
      └── InternalError
      └── OutOfMemoryError
      └── StackOverflowError
      └── UnknownError
How well did you know this?
1
Not at all
2
3
4
5
Perfectly