Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

java scan next into array

public static void main (String[] args)
{
    Scanner input = new Scanner(System.in);
    double[] numbers = new double[5];

    for (int i = 0; i < numbers.length; i++)
    {
        System.out.println("Please enter number");
        numbers[i] = input.nextDouble();
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #java #scan #array
ADD COMMENT
Topic
Name
8+2 =