Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

java question: The following is a code that prints an array from 0 to 10000. Can

ID: 3905941 • Letter: J

Question

java question:

The following is a code that prints an array from 0 to 10000. Can someone please modify the following code to do the following:

The array still contains all integers between 0 and 10,000.  Print the first 25 numbers, 5 numbers per line, seperated each by a comma.TH

THE FOLLOWING CODE TO MODIFY:

public class Integers

{
  
public static int[ ] integers(int numbers)

{


//creates an array containing desired integers
int[] result = new int[numbers];

for(int i = 0; i < numbers; i++){
  
  
   result[i] = i;
}

return result;

}
  
public static void main(String[] args)

{  
   int[] z = integers(10001);
   for(int i = 0; i < z.length; i++)

System.out.println(z[i]);

}

}

Thank you!!!

Explanation / Answer

public class Integers { public static int[ ] integers(int numbers) { //creates an array containing desired integers int[] result = new int[numbers]; for(int i = 0; i