Category Java

Classes and Objects in Java

Java Class components

In this tutorial, we will be familiar with basic concepts of classes and objects in Java with the help of real-time examples. We know that Java is a true object-oriented programming language. In the object-oriented programming language, we design and…

Upcasting and Downcasting in Java

Upcasting in java

In this tutorial, we will learn how to perform upcasting and downcasting in Java programming through various example programs. When the reference variable of superclass refers to the object of subclass, it is known as upcasting in Java. In other…

Method Overriding in Java (with Examples)

An example of performing method overriding in Java.

Method overriding in Java means redefining a method in a subclass to replace or customize the functionality of a method inherited from the superclass. When the method of superclass is overridden in the subclass to provide more specific implementation, it…

Use of Method Overloading in Java

Use of method overloading in java realtime project

There is always a problem for Java beginners to understand the real-time use of method overloading in Java program or Java project level. They do not understand when to use the method of overloading in Java program? In this tutorial,…

Method Overloading in Java with Examples

An example program showing method overloading in Java.

When a class has more than one method having the same name but with different parameter lists, this feature is called method overloading in Java. In other words, when you declare multiple methods with the same name but different method…