Courses
Tutorials
Practice
Data Structure
Java
Python
HTML
Interview Preparation
DSA
Practice Problems
C
C++
Java
Python
JavaScript
Data Science
Machine Learning
Courses
Linux
DevOps
SQL
Web Development
System Design
Aptitude
GfG Premium
Similar Topics
Web Technologies
37.4K+ articles
DSA
22.8K+ articles
Java
10.8K+ articles
Misc
8.8K+ articles
Java Programs
2.0K+ articles
Java - util package
1.6K+ articles
Java-Collections
1.1K+ articles
Java-Arrays
169+ articles
java-stream
142+ articles
Java-List-Programs
57+ articles
Java-Array-Programs
117+ posts
Recent Articles
Popular Articles
Java Program to Sort 2D Array Across Columns
Last Updated: 18 March 2022
The Vector class implements a growable array of objects. Vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in the java....
read more
Java
Java Programs
Blogathon
Blogathon-2021
Java-Array-Programs
Java Program to Sort 2D Array Across Left Diagonal
Last Updated: 10 October 2021
The Vector class implements a growable array of objects. Vectors basically fall in legacy classes but now it is fully compatible with collections. It is found in java.util...
read more
Java
Java Programs
Blogathon
Blogathon-2021
Java-Array-Programs
Java Array mismatch() Method with Examples
Last Updated: 15 November 2024
Themismatch()method in Java is a utility from thejava.util.Arraysclass. It is used to compare two arrays element by element and determines theindex of the first mismatch. ...
read more
Java
Picked
Java-Arrays
Java-Array-Programs
Sort an Array in Java using Comparator
Last Updated: 24 March 2025
A Comparator is an object that can be used to compare two objects and determine their order. We can use a Comparator to sort a list of objects in any order we can choose, ...
read more
Java
Technical Scripter
Technical Scripter 2022
Java-Array-Programs
How to Take Array Input From User in Java?
Last Updated: 17 April 2025
Arrays in Java are an important data structure, and we can add elements to them by taking input from the user. There is no direct method to take input from the user, but w...
read more
Java
Java Programs
Java-Arrays
Java-Array-Programs
How to Add Random Number to an Array in Java?
Last Updated: 18 November 2024
To generate an array of integers with random values the nextInt() method from the java.util.Random class is used. From the random number generator sequence, this method re...
read more
Java
Java Programs
Picked
Arrays
Java-Arrays
Java-Array-Programs
Java Examples
Java Array Exercise
Last Updated: 13 March 2024
An array is a group of elements with similar data types that are bound together as one. The array allows us to store and manipulate a collection of elements together. Mas...
read more
Java
Arrays
Java-Arrays
Java-Array-Programs
How to Efficiently Remove Duplicates from an Array without using Set?
Last Updated: 27 April 2024
Arrays are a fundamental data structure in Java that stores data of the same type in contiguous memory locations. Removing duplicate elements from an array is a common ope...
read more
Java
Java Programs
Picked
Java-Arrays
Java-Array-Programs
Java Examples
How to Find the Maximum Element in an Array?
Last Updated: 15 November 2024
In Java, the array is a data structure that allows the users to store data of the same type in contiguous memory locations. To find the maximum element in an Array in Java...
read more
Java
Java Programs
Picked
Java-Arrays
Java-Array-Programs
Java Examples
How to Get First Element in Array in Java?
Last Updated: 24 December 2024
In Java, to get the first element in an array, we can access the element at index 0 using array indexing. Example 1: Below is a simple example that demonstrates how to acc...
read more
Java
Java-Arrays
Java-Array-Programs
How to Get Last Element in Array in Java?
Last Updated: 24 December 2024
In Java, to get the last element in an array, we can access the element at the index array.length - 1 using array indexing. The length property of the array provides its t...
read more
Java
Java-Arrays
Java-Array-Programs
How to Check if an Array is Empty or Not in Java?
Last Updated: 09 December 2024
In Java, arrays do not have a built-in method like isEmpty() to check if they are empty. So, we need to use other ways to check if an array is empty in Java.Example: The s...
read more
Java
Java Programs
Java-Arrays
Java-Array-Programs
Java Array Empty Check
Last Updated: 09 December 2024
In Java, an array is considered non-empty, if it is not null and its length is greater than 0. It is important to check if an array is not empty before performing operatio...
read more
Java
Java-Arrays
Java-Array-Programs
How to Get Subarray in Java?
Last Updated: 09 December 2024
In Java, subarrays are the contiguous portion of an array. Extracting subarrays in Java is common when working with data that needs slicing or partitioning. Java does not ...
read more
Java
Java-Arrays
Java-Array-Programs
Java Program to Check if Specified Element is Present in the Array
Last Updated: 09 December 2024
In Java, to check if a specified element is present in an array, we have to iterate through the array and compare each element with the target value. This can be done usin...
read more
Java
Java Programs
Java-Arrays
Java-Array-Programs
1
2
3
4
5
6
7
8
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our
Cookie Policy
&
Privacy Policy
Got It !