DEV Community

Igor Rudel
Igor Rudel

Posted on

Java: Checked e Unchecked Exceptions

O Java classifica as exceptions em duas principais categorias: Checked e Unchecked.

Checked -> exceções que são verificadas em tempo de compilação e obrigam o desenvolvedor a tratar. São sempre filhas de Exception.

  • Ex: new FileInputStream(new File(""))

Unchecked -> exceções que não são verificadas em tempo de compilação, não obrigando o tratamento. São sempre filhas de RuntimeException.

  • Ex: NullPointerException

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Ask anything about your entire project, code and get answers and even architecture diagrams. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Start free in your IDE

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay