JavaSE 静态初始化数组
作者:互联网
package array;
public class ArrayDemo1 {
public static void main(String[] args) {
// 静态初始化定义数组
// double[] scores = new double[]{99.5, 88.0, 75.8};
double[] scores = {99.5, 88.0, 75.8};
// int[] ages = new int[]{12,15,13};
int[] ages = {12,15,13};
// String[] names = new String[]{"Dean", "Jing", "Amy"};
String[] names = {"Dean", "Jing", "Amy"};
}
}
标签:初始化,Jing,String,int,double,ages,数组,new,JavaSE 来源: https://blog.csdn.net/dyw3390199/article/details/121117115