JavaRush
AI Academy
new
Promotion
Learning
Courses
Tasks
Quizzes
Games
Help
Schedule of nudges
Internship
Community
Users
Forum
Chat
Articles
Activities
Reviews
Subscriptions
Light theme

Lectures

  • Reviews
  • About us
  • CS50
Start
Start learning
Start learning
  • My progress
  • Courses
  • Quest map
  • Lectures
  • Exception hierarchy in Java

    JAVA 25 SELF
    24 level,0 lecture
    In this lecture we break down the fundamentals of Java’s exception system: the root class Throwable, the differences between Exception and Error, as well as the division into checked and unchecked exceptions. You will see a diagram and a table of differences, code examples with try- catch and throws, learn what to catch and what not to, and examine typical mistakes in exception handling.
    Open
  • Creating custom exceptions

    JAVA 25 SELF
    24 level,1 lecture
    In this lecture, we’ll cover when and why to create your own exceptions in Java: how to choose between Exception and RuntimeException, design constructors with the String message and Throwable cause parameters, add useful fields, and use them correctly in code. We’ll discuss naming, scope of responsibility, documenting via throws, and common mistakes. Plus—why it’s sometimes better to throw an exception than return false.
    Open
  • Exception chaining (Exception Chaining)

    JAVA 25 SELF
    24 level,2 lecture
    A step-by-step guide to exception chaining in Java: how to correctly “wrap” exceptions and pass the cause so you don’t lose the call stack. We’ll examine constructors with a Throwable parameter, the use of getCause() and printStackTrace(), show an example with UserManagementException, and discuss common mistakes—from throwing a new exception without a cause to “swallowing” errors.
    Open
  • Advanced exception handling and best practices

    JAVA 25 SELF
    24 level,3 lecture
    Advanced exception handling in Java: multiple catch blocks, the multi-catch syntax and its rules, ordering from specific to general, as well as best practices — from the inadmissibility of “swallowing” errors to throwing the most specific exceptions and avoiding exceptions as a control-flow mechanism. Everything is accompanied by examples, a breakdown of common mistakes, and style tips.
    Open
  • Exceptions as part of the API and try-with-resources

    JAVA 25 SELF
    24 level,4 lecture
    In this lecture we’ll break down why exceptions are part of a method’s contract in Java, how to document them via Javadoc with the @throws tag, when to choose checked vs. unchecked exceptions, and how to work with resources safely using the try-with-resources construct. We’ll discuss the role of the AutoCloseable interface, show practical examples, and cover common pitfalls.
    Open
Courses
  • Java Course
  • Python Course
  • Development with Claude Code
  • All 16 courses
University
  • Java FullStack
  • Python FullStack
  • AI Native Developer
  • Web FullStack
Community
  • Articles
  • Forum
  • Help with Tasks
Company
  • About us
  • Contacts
  • Reviews
  • Pricing
  • Questions and answers
JavaRush JavaRush: online courses in Java and other programming languages, where you learn by solving tasks. We started in 2012 with a Java course, and today there are 16 courses: Java and Spring, Python, web development, SQL, Go, C#, C++, Kotlin, Swift, Docker and AI development. More than 10,000 tasks with instant checks, and the first level of any course is free. Learn on your own or with a mentor at JavaRush University.
Follow us
Язык интерфейса
Русский
English
Українська
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy
MastercardVisa
"Programmers are not born" © 2026 JavaRush Terms of Use and Privacy policy