Exception in Java

In this topic, you will learn about, Exception in Java.

Exception: in java, language exceptions can be hands by using the exception handling class.it is also called an error.

There are two types of exceptions used with a programming language.

  1. Runtime exception: Runtime time exception generate with logical mistakes. It can be handle by using an exception handling class and its access was any number divided by zero. Store values more than array size in the proper use of wrapper class.
  2. Compilation exception: It is also called syntax error. Using this exception we can execute java code. Compilation exceptions cannot handle with the help of exception handling class. Any spelling mistakes, missing semicolons, or braces are examples of compile-time exceptions.

Comment below if you have queries related, Exception in Java.

See also  What is a vector? How is it different from an array?