I summarized the types and basics of Java exceptions

Java exception (error)

Exception handling important for writing Java What kind of exceptions exist in Java in order to handle the exception properly? What to do I think it is important to suppress that, so I investigated and summarized Java exceptions again. This article doesn't write any code, only the basics about Java exceptions.

Error type

There are three types of errors. Of these, only run-time errors need to be handled as exceptions.

Syntax error

Runtime error

Logic error

What are the exceptions in the first place?

Then what is exception handling?

Exceptions to check and exceptions to not

Exception type

The exceptions are roughly divided into the following three

  1. Error type: Exception that is unlikely to recover
  2. Exception type: Exception for which recoverable measures should be taken
  3. RutimeException series: Exceptions that should never be dealt with

Of these, the only exceptions to be handled (checked exceptions) are Exception-type exceptions.

Check exception (check exception)

Unchecked exception (unchecked exception)

The site that I used as a reference

http://qiita.com/yuya_presto/items/3b651d6b0cf38f77e933 http://qiita.com/kata/items/bd129ba6113a61126389 http://qiita.com/yuba/items/d41290eca726559cd743

References

Kiyotaka Nakayama, Daigo Kunimoto (2011/10/7) "Introduction to Java for a refreshing understanding" Impress Japan

Recommended Posts

I summarized the types and basics of Java exceptions
[day: 5] I summarized the basics of Java
I tried to summarize the basics of kotlin and java
I compared the characteristics of Java and .NET
I didn't understand the behavior of Java Scanner and .nextLine ().
Java beginners briefly summarized the behavior of Array and ArrayList
[Java] I thought about the merits and uses of "interface"
Now, I've summarized the basics of RecyclerView
Basics of Java development ~ How to write programs (variables and types) ~
[Java] I personally summarized the basic grammar.
I tried to summarize the methods of Java String and StringBuilder
I passed the Oracle Java Bronze, so I summarized the outline of the exam.
Basics of java basics ② ~ if statement and switch statement ~
I translated the grammar of R and Java [Updated from time to time]
[Java] The confusing part of String and StringBuilder
Basics of threads and Callable in Java [Beginner]
I touched on the new features of Java 15
Try the free version of Progate [Java I]
[Java] Variables and types
I received the data of the journey (diary application) in Java and visualized it # 001
[Java] Types of comments and how to write them
Please note the division (division) of java kotlin Int and Int
[For beginners] DI ~ The basics of DI and DI in Spring ~
The comparison of enums is ==, and equals is good [Java]
Organizing the current state of Java and considering the future
Java language from the perspective of Kotlin and C #
[Ruby] Class nesting, inheritance, and the basics of self
Equivalence comparison of Java wrapper classes and primitive types
A memo about the types of Java O/R mappers and how to select them
Docker monitoring-explaining the basics of basics-
Basics of character operation (java)
I summarized the collection framework.
Understand the basics of docker
I investigated Java primitive types
The basics of Swift's TableView
Summary of Java language basics
[Java] I implemented the combination.
Advantages and disadvantages of Java
I studied the constructor (java)
[Note] Java Output of the sum of odd and even elements
A quick explanation of the five types of static in Java
Command to check the number and status of Java threads
I tried JAX-RS and made a note of the procedure
What should I do after January 2019 regarding the Java payment issue and Java 8 end of support issue?
Basics of conditional branching and return
[Java] Various summaries attached to the heads of classes and members
I compared PHP and Java constructors
About the basics of Android development
[Java] Basic types and instruction notes
About fastqc of Biocontainers and Java
[Java version] The story of serialization
Java Primer Series (Variables and Types)
I want to return to the previous screen with kotlin and java!
I read the source of ArrayList I read
The basics of SpringBoot + MyBatis + MySQL
I read the source of Integer
This and that of the JDK
Collection of programming selection tasks to make and remember (Java basics)
I read the source of Long
I tried the Java framework "Quarkus"
Read the first 4 bytes of the Java class file and output CAFEBABE