CS计算机代考程序代写 Java import java.util.Random;

import java.util.Random;

public class TestDisplay {

public static void display(E[] xs) {
for (int i=0; i0) {
System.out.print(“,”);
}
System.out.print(xs[i]);
}
System.out.println();
}

public static void main(String[] args) {

Random generator;
generator = new Random();

Integer[] xs;
xs = new Integer[5];

for (int i=0; i<5; i++) { xs[i] = generator.nextInt(100); } display(xs); String[] words; words = new String[7]; words[0] = "alpha"; words[1] = "bravo"; words[2] = "charlie"; words[3] = "delta"; words[4] = "echo"; words[5] = "foxtrot"; words[6] = "golf"; display(words); } }