Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

advantages of Exception handling in java

1) Separating normal code from exception handling code to avoid abnormal 
termination of program.
2) Categorizing in to different types of Exceptions so that rather than 
handling all exceptions with Exception root class we can handle with specific 
exceptions. It is recommended to handle exceptions with specific Exception 
instead of handling with Exception root class.
3) Call stack mechanism : If a method throws an exception and it is not handled 
immediately, then that exception is propagated or thrown to the caller of that 
method. This propogation continues till it finds an appropriate exception 
handler,if it finds handler it would be handled otherwise program terminates
abruptly.
Comment

PREVIOUS NEXT
Code Example
Java :: java stream and filter 
Java :: android set focus on edittext 
Java :: java date and time 
Java :: java get filename without extension 
Java :: asscending linkedlist remove duplicates valuesjava 
Java :: export JAVA_HOME=` mac 
Java :: in java how to compare two strings 
Java :: keytool error: java.lang.Exception: Key pair not generated, alias <demo already exists 
Java :: logging in java 
Java :: bufferedinputstream 
Java :: how to compare strings java 
Java :: BottomNavigationView only icon 
Java :: spring-boot java header appliacation/json constant 
Java :: spring boot swagger ui 401 
Java :: javafx get the controller of a pane 
Java :: retrofit 
Java :: how to check if a person presses a button in jframe in java 
Java :: java arraylist with double 
Java :: argumentcaptor java mockito 
Java :: java not equal to 
Java :: what are abstract methods in java 
Java :: print all numbers from 1 to n java 
Java :: lauch java batch 
Java :: java date equals other date 
Java :: Example of Creating a Java Stack 
Java :: and roid shape setCornerRadii 
Java :: single dex file error android 
Java :: call fragment method from activity 
Java :: overload and override in java 
Java :: osmdroid get current zoom level 
ADD CONTENT
Topic
Content
Source link
Name
4+7 =