Java Basic

Java Method Overriding

❮ Previous Next ❯ Method Overriding in Java Method overriding in Java is a feature of object-oriented programming that allows a subclass to provide a specific implementation of a method that is already defined in its superclass. This means that the subclass method replaces the implementation of the same method in the superclass. To perform […]

Java Method Overriding Read More »

Java Method Overloading

❮ Previous Next ❯ Method Overloading in Java Having two or more methods with the same name but different parameters is known as method overloading in Java. Method overloading allows you to define multiple methods within the same class that share the same name. These methods are differentiated by their parameters, enabling varied functionalities under

Java Method Overloading Read More »

Java Inheritance

❮ Previous Next ❯ Inheritance in Java What is Inheritance? Inheritance is a fundamental concept in object-oriented programming (OOP). It allows one class to inherit the properties and behaviors of another class, creating a parent-child relationship between the classes. How Does It Work? In Java, you can create a base class (or parent class) with

Java Inheritance Read More »

Java Properties

❮ Previous Next ❯ Properties in Java Java does not have properties like C#, but it provides a similar concept using private fields and public getter and setter methods. The idea behind using getter and setter methods in Java is similar to the concept of properties in C#. These methods allow controlled access to the

Java Properties Read More »

Java Array class

❮ Previous Next ❯ Array Class in Java Java provides the java.util.Arrays class to handle various array-related operations. This class offers methods for manipulating, searching, and sorting elements of an array. The Arrays class in Java serves as a utility class to work with arrays, making it easier to perform common operations.Below are the commonly

Java Array class Read More »

Java Varargs

❮ Previous Next ❯ Java Varargs If you have been told to buy fruits for 100 rupees then you will have to find out which fruits you can buy based on your budget. In this scenario we do not know which fruits you will be buying hence you don’t know how many fruits you’ll need

Java Varargs Read More »