About 172,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. Java Array (With Examples) - Programiz

    Here is the syntax for accessing elements of an array, Let's see an example of accessing array elements using index numbers. public static void main(String[] args) { // create an array int[] …

  4. How to Declare an Array in Java? - GeeksforGeeks

    Feb 28, 2025 · Declaration of an Array in Java is very straightforward. First, we need to specify the data type of the element, followed by square brackets [], and then we need to write the …

  5. Arrays (The Java™ Tutorials > Learning the Java Language - Oracle

    The following program, ArrayDemo, creates an array of integers, puts some values in the array, and prints each value to standard output. public static void main(String[] args) { // declares an …

  6. What are Arrays in Java? - Online Tutorials Library

    To use an array in a program, you must declare a variable to reference the array, and you must specify the type of array the variable can reference. Here is the syntax for declaring an array …

  7. How to Initialize an Array in Java? - GeeksforGeeks

    Apr 14, 2025 · In this article, we will discuss different ways to declare and initialize an array in Java. Understanding how to declare an array in Java is very important. In Java, an array is …

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

  9. Java Array Tutorial for Beginners - Java Guides

    This tutorial has covered the basics of arrays, providing a solid foundation for working with arrays in your Java programs. With practice, you will become comfortable using arrays to solve …

  10. Java Array | Java Tutorial Network

    Jan 6, 2015 · In this tutorial I will show you how to create and use arrays in Java. The array is a collection of variables from the same type. Arrays are used for multiple purposes. For example …

  11. Some results have been removed
Refresh