🌐
W3Schools
w3schools.com › java › java_arrays.asp
Java Arrays
Java Examples Java Videos Java ... Q&A Java Certificate ... Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value....
🌐
Oracle
docs.oracle.com › javase › 8 › docs › api › java › util › Arrays.html
Arrays (Java Platform SE 8 )
October 20, 2025 - Java™ Platform Standard Ed. 8 ... This class contains various methods for manipulating arrays (such as sorting and searching).
Discussions

How does Java reserve memory for arrays?
You are confusing the "1000 someObjects" versus "1000 references to someObjects". The array just refers to objects, it doesn't actually "contain them". When you allocate the array, it initially will be the size of 1000 object references and they will be set to null. Does that make sense or do you need more detail? More on reddit.com
🌐 r/learnprogramming
7
2
September 30, 2013
[Java] need help with 2D arrays and making a chess board
I think it's pretty clear you didn't read the FAQ and the sidebar. Please read them before continuing and make sure you understand the bit about coding code on pastebin or http://gist.github.com instead of screenshots. More on reddit.com
🌐 r/learnprogramming
15
1
December 3, 2014
How to get array list size in java jsp?
You can use the .size() method of your ArrayList https://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html If you do not need the number of the element and only need the element value then you could skip that and just use the enhanced for statement. https://docs.oracle.com/javase/tutorial/java/nutsandbolts/for.html More on reddit.com
🌐 r/javahelp
1
2
November 16, 2014
[JAVA] Arrays. ELI5 please.
Think of an array kind of like the cabinets in your kitchen, all in a line. Each cabinet has a specific location in your kitchen. If you were to tell someone where to find the cups when they're over at your house, you might say "They're in the cabinet over the stove, on the left". Your cabinets are used for storage of your dishes and other kitchen items, and they can be organized a certain way to make finding what you need easier. A one dimensional array is essentially a line of "cabinets" that you can store data in, where each cabinet has its own index, or location, that you reference it by. An array can be unsorted or sorted, and many algorithms exist to sort them, with some being fast, and some requiring very little extra memory. Something like .length or .size simply returns the amount of cabinets in your kitchen, or in programming terms, the number of spaces in your array. You can also make a two dimensional array, which you can think of like a grid of cubby holes at a pre-school, or more mathematically, as a matrix. These work exactly the same as a 1D array, but each element has two indexes instead of one, like an X and Y coordinate on graph paper. An array is stored linearly in memory and its indexes usually start at zero. The following example is how to create an array and fill it with numbers using Java. int[] myArray = new int[10]; //Creates an array of size 10 to store integers for(int i = 0; i < myArray.length; i++) { myArray[i] = i; } //myArray.length = 10, i = 0, loop until i > 9 //On each iteration, myArray at index i will contain the current value of i //When this loop finishes, myArray will contain 0,1,2,3,4,5,6,7,8,9 in that order Arrays are the simplest data structure you will be dealing with, but they are incredibly useful and have a huge amount of applications. Many complex data structures use arrays in some way. For example, you can represent a graph structure as a matrix, or two dimensional array, of connected edges. You can efficiently sort data without using any extra memory using a heap structure, which at its most basic form is just an array that can be sorted in place. Once you grasp arrays, you will be able to grasp the more complex structures much more easily. If there is anything else I can help you with, please let me know. More on reddit.com
🌐 r/learnprogramming
14
3
May 13, 2013
🌐
GeeksforGeeks
geeksforgeeks.org › java › arrays-in-java
Arrays in Java - GeeksforGeeks
An array is a collection of elements of the same data type stored in contiguous memory locations. It allows multiple values to be stored under a single name and accessed using an index.
Published   2 weeks ago
🌐
Medium
yuvrajscorpio.medium.com › arrays-in-java-be5bad06099a
Arrays in Java. Check out the full Java series here. | by Yuvraj Kevit | Medium
September 3, 2025 - Check out the full Java series here. An array is a data structure used to store a collection of variables (elements) of the same type. The elements of an array are stored in a contiguous memory location.
🌐
Oracle
docs.oracle.com › javase › specs › jls › se7 › html › jls-10.html
Chapter 10. Arrays
September 16, 2025 - In the Java programming language, arrays are objects (§4.3.1), are dynamically created, and may be assigned to variables of type Object (§4.3.2).
🌐
Oracle
docs.oracle.com › javase › tutorial › java › nutsandbolts › arrays.html
Arrays (The Java™ Tutorials > Learning the Java Language > Language Basics)
See Java Language Changes for a ... enhancements, and removed or deprecated options for all JDK releases. An array is a container object that holds a fixed number of values of a single type....
Find elsewhere
🌐
Go4Expert
go4expert.com › articles › java-arrays-t1598
Java Arrays | Go4Expert
Growing an Array in Java Suppose you have an array of some type that is full, and you want to grow it. Employee[] a = new Employee[100]; //...
🌐
GitHub
github.com › kunal-kushwaha › DSA-Bootcamp-Java › blob › main › assignments › 05-arrays.md
DSA-Bootcamp-Java/assignments/05-arrays.md at main · kunal-kushwaha/DSA-Bootcamp-Java
This repository consists of the code samples, assignments, and notes for the Java data structures & algorithms + interview preparation bootcamp of WeMakeDevs. - DSA-Bootcamp-Java/assignments/05-arrays.md at main · kunal-kushwaha/DSA-Bootcamp-Java
Author   kunal-kushwaha
🌐
W3Schools
w3schools.com › java › java_arrays_loop.asp
Java Loop Through an Array
Java Examples Java Videos Java Compiler Java Exercises Java Quiz Java Code Challenges Java Server Java Syllabus Java Study Plan Java Interview Q&A Java Certificate ... You can loop through the array elements with the for loop, and use the length property to specify how many times the loop should run.
🌐
Octoperf
blog.octoperf.com › java-arrays
Java Arrays - OctoPerf
March 20, 2018 - An Array is a primitive data structure which stores a fixed number of elements. Learn how to create, iterate, clone arrays and more.
🌐
Simplilearn
simplilearn.com › home › resources › software development › java tutorial for beginners › arrays in java: declare, define, and access array
Arrays in Java: Declare, Define, and Access Array [Updated]
January 26, 2025 - The article gives a clear insight into the basics of arrays in java, how to define and declare an array in java, type of arrays with an example. So, click here to learn more
Address   5851 Legacy Circle, 6th Floor, Plano, TX 75024 United States
🌐
Medium
medium.com › @manassonawane26 › arrays-in-java-84871bf93700
Arrays in Java. Arrays in Java are one of the most… | by Manas Sonawane | Medium
September 1, 2025 - Arrays in Java are one of the most commonly used data structures. Whether we’re storing test scores, characters, flags or object references, arrays provide a simple and efficient way to group similar elements together.
🌐
Sololearn
sololearn.com › en › Discuss › 2860954 › help-me-with-arrays-in-java
Help me with arrays in Java | Sololearn: Learn to code for FREE!
Sometimes I see array definitions like * int[] arr={3,4,5}; * Are these arrays on the stack? 2) My code below is not producing the correct output. Can you find why it's not producing the correct output? https://code.sololearn.com/cDyOHEvoDxse/?ref=app ... Ipang ooh, thank you so much! Now I have my doubt cleared. Actually, it turns out that "int[] arr={3,4,5}" is just a short hand for "int[] arr=new int[](3,4,5)". So it's on the heap. Second, there is only pass by value in Java.
🌐
Android Developers
developer.android.com › api reference › arrays
Arrays | API reference | Android Developers
Skip to main content · English · Deutsch · Español – América Latina · Français · Indonesia · Polski · Português – Brasil · Tiếng Việt · 中文 – 简体
🌐
CodingBat
codingbat.com › java › Array-1
CodingBat Java Array-1
Basic array problems -- no loops.. Use a[0], a[1], ... to access elements in an array, a.length is the length (note that s.length() is for Strings). Allocate a new array like this: int[] a = new int[10]; // length 10 array See the Java Arrays and Loops Help document for help.
🌐
CodeChef
codechef.com › practice › arrays
Practice Arrays
Solve Arrays coding problems to start learning data structures and algorithms. This curated set of 23 standard Arrays questions will give you the confidence to solve interview questions.
🌐
GeeksforGeeks
geeksforgeeks.org › java › array-class-in-java
Arrays Class in Java - GeeksforGeeks
The Arrays class in the java.util package is a utility class that provides a collection of static methods for performing common operations on Java arrays, such as sorting, searching, comparing and converting arrays to strings.
Published   November 13, 2025