Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (6.5k points)
What is an exception?

1 Answer

0 votes
by (11.3k points)

Whenever we face an anomaly during the usual process of execution of a Java program, the anomaly is called an Exception. A lot of times, even if the program has compiled successfully, at runtime, an error can be thrown because of something that comes up during the dynamic phase of a program. Now, there are two ways that the program can deal with an Exception preemptively, throwing an error or catching the error and executing a failsafe snippet of code instead. This way, the program will still execute entirely without stopping at the part where the exception is found. 

These methods of dealing with Exceptions come under Exception Handling which is a very critical aspect to understand if you're looking to learn java

Related questions

0 votes
1 answer
0 votes
1 answer
asked Feb 20, 2020 in Java by angadmishra (6.5k points)

Browse Categories

...