当我编译以下代码时,它会显示此错误:main(java.lang.String) already declared in main(String args[])
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int[] array1 = new int[10];
for (int i = 0; i < array1.length; i++)
if (sc.hasNextInt())
array1[i] = sc.nextInt();
sc.close();
int[] array2 = new int[10];
for (int i = 0; i < array2.length; i++)
if (sc.hasNextInt())
array2[i] = sc.nextInt();
median(array1, array2);
sc.close();
}