About 38,600,000 results
Open links in new tab
  1. Java Arrays - W3Schools

    Arrays are used to store multiple values in a single variable, instead of declaring separate variables for each value. To declare an array, define the variable type with square brackets [ ] : …

  2. Arrays in Java - GeeksforGeeks

    Sep 30, 2025 · Like an array of integers, we can also create an array of other primitive data types like char, float, double, etc. or user-defined data types (objects of a class).

  3. How do I declare and initialize an array in Java? - Stack Overflow

    Jul 29, 2009 · You can either use array declaration or array literal (but only when you declare and affect the variable right away, array literals cannot be used for re-assigning an array).

  4. How to Create an Array in JavaArray Declaration Example

    Mar 16, 2023 · In this article, we will provide a step-by-step guide on how to create an array in Java, including how to initialize or create an array. We will also cover some advanced topics …

  5. Java Array (With Examples) - Programiz

    In this tutorial, we will learn to work with Java arrays. We will learn to declare, initialize, and access array elements with the help of examples. An array is a collection of similar data types.

  6. How to Create an Array in JavaArray Declaration Example

    Aug 24, 2024 · This guide covered arrays in Java in comprehensive detail along with plenty of code examples. You should now feel comfortable declaring, initializing and working with arrays …

  7. Creating Arrays in Java: A Comprehensive Guide - javaspring.net

    May 23, 2025 · Arrays are a fundamental data structure in Java that allow you to store and manage a fixed-size sequence of elements of the same type. Whether you’re working on a …

  8. Java Array – Declare, Create & Initialize An Array In Java

    Apr 1, 2025 · This In-depth Tutorial Explains Various Ways to Declare, Create and Initialize a New Array With Values in Java with the Help of Simple Code Examples.

  9. Arrays in Java: A Reference Guide - Baeldung

    Jul 24, 2024 · We’ll learn some basics like how to declare and initialize an array, but we’ll also cover more advanced subjects like sorting and searching arrays. Let’s go first with declaration …

  10. Arrays in Java - Guru99

    Sep 16, 2024 · Java Array is a very common type of data structure which contains all the data values of the same data type. The data items put in the array are called elements and the first …