Print Odd Numbers from Array

In this tutorial, we will learn to write a Java program to create an array and print the odd elements stored in the array. Our program will first take the input of the array size…

Find the second largest number in Array

In this tutorial you will learn how to write a Java program to find the second largest number in an array. Below is the approach we will take to write our program: In this program…

Find the largest and smallest number in Array

In this tutorial you will learn how to write a Java program to find the largest and smallest number in an array. Below is the approach we will take to write our program: First, we…

Compare two arrays are equal or not in size

In this tutorial you will learn how to write a Java program to compare two arrays and check if they are the same size or not. Below is the procedure we will follow to achieve…

Find the missing number in a second array

In this tutorial, you will learn how to write a Java program to find the missing number in a second array. Since we have a fixed array, we do not need any array input from…

Print first duplicate number in an array of 1-100

In this tutorial, you will learn how to write Java program to print the first duplicate number of an array. This program is going to be very simple. Below are the approach which we will…

Count the duplicate numbers in an array

In this tutorial you will learn how to count the number of occurrences of a number in an array Java. The complete logic behind finding duplicate elements in array in C as: This program is…