静态动态数组

package array;

public class Demo02 {
public static void main(String[] args) {
//静态
int[] a = {1,2,3};
int[] b = new int[3];
b[0]=5;
b[1]=6;
b[2]=7;

    System.out.println(a[0]);
    System.out.println(b[0]);
    System.out.println(a[2]);

}

}

posted @ 2024-11-28 18:13  whoiszqy  阅读(14)  评论(0)    收藏  举报