About 13,400,000 results
Open links in new tab
  1. How to Take Array Input From User in Java? - GeeksforGeeks

    Apr 17, 2025 · Arrays in Java are an important data structure, and we can add elements to them by taking input from the user. There is no direct method to take input from the user, but we can …

  2. java - How do you save user input inside an array? - Stack Overflow

    Jan 6, 2017 · I'm trying to write a that program asks the user to enter the number of patients to be saved in a hospital's database, which is ArraySize . The user must enter the patient's ID, first …

  3. Storing Java Scanner Input in an Array - Baeldung

    Nov 29, 2023 · Learn how to store the input from a Scanner into an array with three different scenarios and examples.

  4. How to Take Array Input in Java - Tpoint Tech

    Java does not provide any direct way to take array input. But we can take array input by using the method of the Scanner class. To take input of an array, we must ask the user about the length …

  5. Java Store Scanner Input In Array: A Comprehensive Guide

    This tutorial will guide you through the process of using the Java Scanner class to collect user input and store it in an array. We will cover everything from basic setup to more advanced …

  6. How to take array input in Java - BeginnersBook

    Jun 1, 2024 · In this guide, you will learn how to take 1D array and 2D array input in Java. We will be using for loop and Scanner class to accomplish this. array[i] = scanner.nextInt(); …

  7. Mastering User Input: Transforming Data into Java Arrays

    Jan 26, 2025 · In this article, we will delve into the techniques and best practices for converting user input into arrays in Java, building upon the concepts outlined in Converting User Input to …

  8. How do I add user input to an Array in java? - Stack Overflow

    Nov 13, 2014 · First, declare a String array of the appropriate size. Second, in your for loop, assign the strings you are currently printing, to positions in the array. The strings are now in an …

  9. How to put a Scanner input into an array... for example a

    To put input from a Scanner into an array in Java, you can use a loop to read the input and store it in the array. Here is an example of how you can do this:

  10. Java Program to Get Array Input - Javacodepoint

    Dec 14, 2024 · This post shows you multiple approaches to get array input in Java. 1. Using a Static Array (Hardcoded Values) This is the simplest way to initialize values directly in the array.

Refresh