0
What is the main idea upon the exception handling?
5 Respostas
+ 8
... to handle exceptions...
such as memory leaks, logical errors, type errors, etc.
+ 4
Main idea to make the program can be run in os without losing bytecodes ,maybe 😑
0
F
0
To stop being caught any runtime error and thus make us system run safely.the exception handling block executes if any run time errors get caught.
class ExceptionHandling
{
public static void main(String[] args)
{
try{
int a=10,b=0;
int c=a/b;
}
catch(ArithmeticException,e)
{
System.out.print("zero division is performed");
}
}
0
If we dont catch exceptions then our program will terminates abnormally and it may cause our system shut down sometimes