Method Overriding In Java
In this tutorial, we will see the method overriding in Java.
When a child class provides a specific implementation for the method already declared in parent class, it is called a method overriding.
So both parent class and child class will have the same method but with different implementations.
Example:-
/**
* A Java Program to explain the...
Method Overloading In Java
In this tutorial, we will see the method overloading in Java.
Introduction
It is known as Method Overloading when a class has the same name but a different method signature.
For example, when we have a method add(), we can have it in multiple forms.
For example add(int a, int b) or add(int a, int b, int c) or add(double a, double b)
W...
GIT Cheat Sheet
A cheat sheet for GIT, a free and open-source software for distributed version control.
Create Repository
Clone an existing repository
git clone https://github.com/username/repository-name.git
Create a new local repository
git init
Local Changes
See the changed files in your working directory
git diff
See changes in a particular file...
Check If An Array Is Sorted In Java
In this tutorial, we will see a Java program to check if an array is sorted in Java.
Introduction
We will write a Java program to check if the array is sorted or not.
We will take a sample integer array arr = {1, 3 , 5, 9}; We will return true if the array is sorted or false if the array is not sorted.
Check if an array is sorted or not in J...
Java OOPs Concepts
In this tutorial, we will see the basic object-oriented programming concepts.
Introduction
Object-oriented programming (OOP) is a computer programming model that organizes software design around data, or objects, rather than functions and logic.
There are many opps concepts but here we will see the most important 4. I.e Abstraction, Encapsula...
Difference Between Interface and Abstract Class In Java
In this tutorial, we will see the difference between abstract class and interface in Java.
Introduction
Interfaces form a contract between the class and the outside world, and this contract is enforced at build time by the compiler.
An abstract class is a class that is declared with the abstract keyword—it may or may not include abstract meth...
Java Program To Find Second Largest Element In An Array
In This tutorial, we will see a Java program to find the second largest element in an array.
Introduction
In the previous article, Java Program To Find Largest Element In An Array (3 Ways), we have seen a few programs to find the largest element in an array. Today, we will see a program to find the second-largest element in an array.
Here we ...
Java Program To Find Largest Element In An Array (3 Ways)
In this tutorial, we will see how to find the largest element in an array.
Introduction
We will take an array of integers arr and write a program to find the largest number from arr. Please note that arr is not a sorted array. ex. {2, 5, 9, 8, 11}
Java Program to find the largest element in an array
1. Using for loop iteration
In this way,...
99 post articles, 12 pages.