
- Java Tutorial
- Java - Home
- Java - Overview
- Java - Environment Setup
- Java - Basic Syntax
- Java - Object & Classes
- Java - Constructors
- Java - Basic Datatypes
- Java - Variable Types
- Java - Modifier Types
- Java - Basic Operators
- Java - Loop Control
- Java - Decision Making
- Java - Numbers
- Java - Characters
- Java - Strings
- Java - Arrays
- Java - Date & Time
- Java - Regular Expressions
- Java - Methods
- Java - Files and I/O
- Java - Exceptions
- Java - Inner classes
- Java Object Oriented
- Java - Inheritance
- Java - Overriding
- Java - Polymorphism
- Java - Abstraction
- Java - Encapsulation
- Java - Interfaces
- Java - Packages
- Java Advanced
- Java - Data Structures
- Java - Collections
- Java - Generics
- Java - Serialization
- Java - Networking
- Java - Sending Email
- Java - Multithreading
- Java - Applet Basics
- Java - Documentation
- Java Useful Resources
- Java - Questions and Answers
- Java - Quick Guide
- Java - Useful Resources
- Java - Discussion
- Java - Examples
Exception handling with method overriding in Java.
Yes, we can override a method by changing only the exception handling in java pertaining the following rule −
An overriding method can throw any unchecked exceptions, regardless of whether the overridden method throws exceptions or not. However, the overriding method should not throw checked exceptions that are new or broader than the ones declared by the overridden method. The overriding method can throw narrower or fewer exceptions than the overridden method.
- Related Articles
- What are the rules of exception handling with respect to method overriding in java?
- Exception Handling in C++ vs Java
- method overriding with access modifiers in Java
- java access modifiers with method overriding
- Method overriding in Java
- PHP Exception Handling with finally
- Guidelines to follow in while overriding a method that throws an exception in java?
- Importance of Proper Exception Handling in Java
- Nested try blocks in Exception Handling in Java
- Comparison of Exception Handling in C++ and Java
- Can the overriding method throw the super-type of the exception thrown by the overridden method in Java?
- Exception handling in PowerShell
- Can we change an exception of a method with throws clause from unchecked to checked while overriding it in java?
- PHP Exception Handling with Multiple catch blocks
- overriding method different package in java

Advertisements