import java.util.Scanner;public class WorkShoparray{ public static void main() { Scanner in = new Scanner(System.in); int index = 0, howmanypeople = 0; System.out.print("Enter how many people"); howmanypeople = in.nextInt(); int racetime[] = new int[howmanypeople]; String Name[] = new String[howmanypeople]; for(index = 0; index < howmanypeople; index = index + 1) { System.out.print("racetime"); racetime[index] = in.nextInt(); System.out.println("Nameracer"); Name[index] = in.next(); } } }如何在这个数组中找到最大最大值Racetime并显示Name 在另一个方法 public static void sub() 中?求各位大神解答 谢谢
如何将 main和sub链接起来用?是在main中添加sub(int racetime[], String name[]) ?
追答import java.util.Scanner;