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

    Java Arrays. 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 …

  2. Arrays in Java - GeeksforGeeks

    Mar 28, 2025 · To declare an array in Java, use the following syntax: type [] arrayName; type: The data type of the array elements (e.g., int, String). arrayName: The name of the array. Note: …

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

    Jul 29, 2009 · There are various ways in which you can declare an array in Java: float floatArray[]; // Initialize later int[] integerArray = new int[10]; String[] array = new String[] {"a", "b"}; You can …

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

  6. Arrays in Java: A Reference Guide - Baeldung

    Jul 24, 2024 · In this tutorial, we’ll deep dive into a core concept in the Java language – arrays. We’ll first see what’s an array, then how to use them; overall, we’ll cover how to: Get started …

  7. Java arrays with Examples - CodeGym

    Apr 24, 2025 · Java has the java.util.Arrays class for working with arrays. In general, the most common operations performed on arrays are initialization (filling with elements), retrieving an …

  8. Java array - initializing, accessing, traversing arrays in Java

    Feb 23, 2024 · There are several ways how we can initialize an array in Java. In the first example, an array is created and initialized in two steps. int[] a = new int[5]; a[0] = 1; a[1] = 2; a[2] = 3; …

  9. Java Array (with Examples) - HowToDoInJava

    Feb 3, 2023 · Java arrays are types. we can declare the variables of array type. Arrays are ordered and each array has an index beginning from '0' for the first element. Arrays can store …

  10. Arrays in Java tutorial: Declare and initialize Java arrays - Educative

    Nov 11, 2020 · To help your Java journey, in this tutorial, we will learn how to implement and use arrays in Java. A Java array is a group of similarly-typed variables that use a shared name. …

  11. Some results have been removed