Core java tutorial for beginners
A tutorial blog which explains different core concepts related to Java along with programming examples
Subscribe to Startertutorials.com's YouTube channel for different tutorial and lecture videos.

User Defined Exceptions

Categories: Exception Handling. No Comments on User Defined Exceptions

In this article we will learn how to create user defined exceptions (own exceptions) and how to use them in Java programs.   Although Java provides several pre-defined exception classes, sometimes we might need to create our own exceptions which are also called as user-defined exceptions.   Steps for creating a user-defined exception: Create a […]

Read the rest of this entry »

throw throws and finally

Categories: Exception Handling. No Comments on throw throws and finally

In this article we will look at the use of throw throws and finally keywords of exception handling in Java programs.   throw Keyword   The throw keyword can be used in Java programs to throw exception objects explicitly. The syntax of using throw is as follows:   throw ThrowableInstance;   The ThrowableInstance can be object of Throwable class or any of its […]

Read the rest of this entry »

Exception Handling Overview

Categories: Exception Handling. No Comments on Exception Handling Overview

In this article we will look at what is an exception?, what is exception handling?, and how Java supports exception handling.   Introduction   In general, the errors in programs can be categorized into three types: Syntax errors: Also called compile time errors when a program violates the rules of the programming language. Ex: missing […]

Read the rest of this entry »