0
package array;
import java.util.Scanner;
public class Array {
public static void main(String[] args) {
int n;
Scanner input = new Scanner(System.in);
n = input.nextInt();
int[] a = new int[n];
for (int i = 0; i < n; i++) {
a[i] = input.nextInt();
}
System.out.println(a);
}
}
和它是什麼錯誤..? – ergonaut
n = 5 a = {3 4 6 7 9}在屏幕上:[I @ 647e05 – Merian
@ IQ246這不是錯誤它打印數組'Object' –