JAVA Tutorials

Method Overriding Rules and Scope in Java : Free Java Tutorials

Method overriding is as important as method overloading and a slightly tricky concept of Java. Whenever we do method overriding, we must follow some rules and take care of the scope of access modifiers. We will discuss these things in detail in this article. Method overriding scope and rules related access modifiers Private methods of …

Method Overriding Rules and Scope in Java : Free Java Tutorials Read More »

Method Overriding and Exception Hierarchy in Java : Free Java Tutorials

Method Overriding is as important as Method Overloading in Java. In this tutorial, we will understand Exception Hierarchy in Java and understand the rules that we follow when we override methods which throws different types of Exceptions. If child class method throws any checked exception, then parent class method should compulsorily throw the same checked …

Method Overriding and Exception Hierarchy in Java : Free Java Tutorials Read More »

Method Overriding with respect to static methods in Java : Free Java Tutorials

In this tutorial, we will explore method overriding concept with respect to static methods. We will also see the difference between method hiding and method overloading with respect to static methods. In the end, we will find out whether method overriding is possible with the static methods or not. We cannot override a static method …

Method Overriding with respect to static methods in Java : Free Java Tutorials Read More »

Introduction to Method Overriding in Java : Free Java Tutorials

Method overriding is as important as method overloading and a slightly tricky concept of Java. Whatever method Parent class contains, are available to the Child class through inheritance. If the child class is not satisfied with the parent class implementation, then the child is allowed to redefine that method based on its requirement. This process …

Introduction to Method Overriding in Java : Free Java Tutorials Read More »

Encapsulation in Java : Free Java Tutorials

 Encapsulation is the process of binding data variables and the corresponding methods into a single unit. Every class in Java is an example of encapsulated class. It brings high security and reliability to an application. Consider an example of a class named Teacher which contains data variables related to teaching profession and methods which represent …

Encapsulation in Java : Free Java Tutorials Read More »