Udemy
    •  
    •  
    •  
    •  
    •  
    •  
    •  
    •  
Turn what you know into an opportunity and reach millions around the world.
Learn More
Your cart is empty.
Keep shopping
Java Exceptions Handling, Assertion, Java Logging API
Rating: 3.6 out of 5(32 ratings)
1,251 students

Java Exceptions Handling, Assertion, Java Logging API

A fundamental guide on Java Exceptions Handling - Assertion - Java Logging API
Created bySera Nguyen
Last updated 3/2015
English

What you'll learn

  • Handle errors in Java applications with try-catch technique
  • Apply different handling exception techniques
  • Utilize exception handling techniques in finding errors in Java applications
  • Write custom exception classes for handling errors
  • Apply assertion technique in testing code
  • Apply Java Logging API for recording application information effectively
  • Master logging levels and handlers
  • Create custom handlers
  • Apply changes in default logging settings

Course content

3 sections14 lectures48m total length
  • Introduction to Exception Handling2:15

    Learn what are exceptions and how they affect your program

  • try-catch Blocks4:05

    Learn how to use the basic of try-catch block

  • Exception Types: Checked vs. Runtime Exceptions.2:46

    It is important to differentiate the checked and runtime exceptions in Java

  • Throwing exceptions: throws - throw Keyword3:23

    Distinguish when to use the throws and throw keywords

  • The finally Block1:57

    Discover what and why of using the finally block

  • Exception Propagation2:07

    Learn how to locate exception code with printing stack trace

  • New in Java 7: Catching Multiple Exceptions, try-with-resources Statement3:11

    Improve your exception handling code with new features in Java 7+

  • Write Your Own Exception Classes3:36

    Learn how to write your own exception classes

  • Assertion4:18

    Learn how to use the assert keyword for testing purpose in your program

Requirements

  • Students need to have a basic Java skills
  • Students need to know how to implement OOP concepts, not necessarily in advance, just basic skills
  • All the source code projects are created in Netbeans 8 running on JDK 8

Description

One of the fundamental skills in Java language as well as in other programming langues is to master how to handle errors in applications.

Java provides a powerful and flexible way to help you in controlling your programs in a stable mode even in cases runtime exceptions occur.

Handling errors in Java applications involves Exception Handling, Assertion, and Logging.

Exceptions handling may sound simple but if you don't know fundamental concepts and techniques clearly, you may or may have been using it in the wrong way.

In the Exception Handling section, I will walk you through all the core concepts and vital techniques, including:

  • Basic usage of try-catch block
  • Exception types
  • When to use throws and throw keywords
  • The finally block
  • Locating exceptions code
  • New features in Java 7: catching multiple exceptions, try-with-resource
  • Make your own exception classes.
  • And more coming.

You will also learning how to use the assert keyword and enable/disable it in your code.

Along with Exception Handling and Assertion, you will also learn how to record information which might generate during the program execution with the Java Logging API.

In this section, I will show you how to:

  • Record information with different levels and Handlers
  • Create your own custom handler with custom format: text, HTML
  • Change the default settings for logging in JDK.

The course includes all the sample source code for each lecture.

Hope you enjoy the course, and do not hesitate to ask questions in the discussion section if you have any.

Who this course is for:

  • Students who want to learn how to handle errors in Java applications
  • Students who want to have a big picture of Java Exception Handling
  • Students who take Java example where exception handling is involved
  • Students who want to learning how to log information in Java application