创建数组的三种方式

xiaoxiao2021-02-28  69

java创建数组的三种方式:

Object[] objects = new Object[10];//第一种直接new,要显式指定数组长度 int[] ints = new int[]{1,2,85};//创建即初始化,使用new不用显式指定长度 int[] is = {1,2,85}; //创建即初始化

转载请注明原文地址: https://www.6miu.com/read-78603.html

最新回复(0)