This is a memo of Java exception handling used in business. I used it during development, so I summarized it.
Exceptions occur during unusual special conditions when running a Java program. Exception handling is executed when an exception occurs.
As an aside, I thought that the program structure of exception handling was visually easy to understand, like an if statement.
//Exception handling syntax
try{
//Processing that may cause an exception;
} catch (Exception class variable name){
//What to do when an exception occurs(Processing that is not performed unless an exception occurs);
} finally {
//The last process to be executed regardless of the presence or absence of exceptions
}
Normal execution is only try block. If an exception occurs, the process immediately shifts to the catch block.
At present, most SE operations include creating specifications in Excel and responding to emails. ..
Under such circumstances, I am doing my best, thanking you for being involved in Java development.
Recommended Posts