java23.3.21
遍历数组所有元素
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);
}
}
}
遍历数组所有元素
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);
}
}
}