public class ExampleEx {
public static void main(String[] args) {
int[] arr = new int[5];
String[] s = new String[5];
float[] f = new float[5];
for(int i=0; i<arr.length; i++) {
arr[i] = i+1;
System.out.print(arr[i]+" ");
}
int[][] arr2 = new int[4][]; //๊ธธ์ด ๋ค๋ฅด๊ฒ ์ ์ธ
arr2[0] = new int[1];
arr2[1] = new int[2];
arr2[2] = new int[3];
arr2[3] = new int[4];
}
}
728x90
๋ฐ์ํ
0