About 223,000 results
Open links in new tab
  1. 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).

  2. 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 [ ] :

  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. 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.

  5. 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.

  6. Declaring Arrays in Java: A Comprehensive Guide - javaspring.net

    Nov 12, 2025 · Understanding how to declare, initialize, and use arrays is essential for any Java programmer. This blog post will provide a detailed overview of declaring arrays in Java, …

  7. Initializing Arrays in Java - Baeldung

    Dec 16, 2024 · 1. Overview An array is a data structure that allows us to store and manipulate a collection of elements of the same data type. Arrays have a fixed size, determined during …

  8. How to Declare and Initialize an Array in Java - GeeksforGeeks

    Oct 11, 2025 · To declare an array, specify the data type followed by square brackets [] and the array name. This only declares the reference variable. The array memory is allocated when …

  9. How to declare and initialize an array in Java? - Intellipaat

    Jul 22, 2025 · So far in this blog, we have learned how we can declare and initialize an array in Java. Java provides multiple ways to declare and initialize arrays, from simple fixed-size …

  10. Java Array - Tutorial Gateway

    Java Array Example : It shows how to declare, create, initialization and access elements using the indexes & print array items using for loop.