About 886,000 results
Open links in new tab
  1. Arrays in Java - GeeksforGeeks

    Sep 30, 2025 · Example: Here we are taking a student class and creating an array of Student with five Student objects stored in the array. The Student objects have to be instantiated using the constructor …

  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 [ ] : We have now …

  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). For primitive types: …

  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 such as multi …

  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. Creating Arrays in Java: A Comprehensive Guide - javaspring.net

    Nov 12, 2025 · Whether you're working on a small utility program or a large-scale enterprise application, understanding how to create and manipulate arrays is essential. In this blog post, we will explore the …

  7. Java Arrays: Creating and Using Arrays - CodeLucky

    Aug 31, 2024 · Explore the fundamentals of Java arrays. Learn how to create and use arrays effectively in your Java programs with clear examples and detailed explanations.

  8. Java Array - Tutorial Gateway

    There are multiple ways to initialize them and the first approach of declaring and Creating a one-dimensional Array in this Programming. int [] Student_Marks = new int [3]; Initializing elements in the …

  9. How To Create An Array In Java (With Examples)

    Jun 17, 2025 · How to Create and Initialize Arrays in Java? Arrays in Java are a fundamental way to store and manage multiple values using a single variable. From handling user data to building logic …

  10. Creating Arrays in Your Programs - Dev.java

    Explore different ways to iterate through arrays and various data types: The preceding program declares an array (named anArray) with the following line of code: Like declarations for variables of other …