Question: Declare an array of integers, named studentNums, with size NUM _ ELEMENTS. Then, read each element of studentNums from input. Ex: If the input is

Declare an array of integers, named studentNums, with size NUM_ELEMENTS. Then, read each element of studentNums from input.
Ex: If the input is 2578156677, then the output is:
Student numbers: 2578156677import java.util.Scanner;
public class StudentTracker {
public static void main(String[] args){
Scanner scnr = new Scanner(System.in);
final int NUM_ELEMENTS =5;
int i;
/* Your code goes here */
System.out.print("Student numbers: ");
for (i =0; i < studentNums.length; ++i){
System.out.print(studentNums[i]+"");
}
System.out.println();
}
}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!