JAva-配列
978 ワード
double[] myList; //
double myList[]; // ,
int[] a = {1,2,3,4}
int[] b = new int[4]
int [] c = new int[rand.nextInt(4)]
String str[][] = new String[3][4];
#
String s[][] = new String[2][];
s[0] = new String[2];
s[1] = new String[3];
s[0][0] = new String("Good");
s[0][1] = new String("Luck");
s[1][0] = new String("to");
s[1][1] = new String("you");
s[1][2] = new String("!");
float[][] numthree; // float 2
numthree=new float[5][5]; // 5 5
public class TestArray {
public static void main(String[] args) {
double[] myList = {1.9, 2.9, 3.4, 3.5};
//
for (double element: myList) {
System.out.println(element);
}
}
}