Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/335.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 写入数组中的元素_Java_Arrays - Fatal编程技术网

Java 写入数组中的元素

Java 写入数组中的元素,java,arrays,Java,Arrays,如果我有一个monthSales的整数数组,长度显然是12,那么“编写一条语句,将对应于十月的元素写入标准输出”意味着什么 写入数组中的元素是否与将所述元素分配给先前定义的变量不同?由于数组索引从0开始,10月份将对应于索引9 System.out.println("Your sales for month of October is" + monthSales[9]); 由于数组索引从0开始,10月份将对应于索引9 System.out.println("Your sales for mon

如果我有一个monthSales的整数数组,长度显然是12,那么“编写一条语句,将对应于十月的元素写入标准输出”意味着什么


写入数组中的元素是否与将所述元素分配给先前定义的变量不同?

由于数组索引从0开始,10月份将对应于
索引
9

System.out.println("Your sales for month of October is" + monthSales[9]);

由于数组索引从0开始,10月份将对应于
索引
9

System.out.println("Your sales for month of October is" + monthSales[9]);

写入标准输出意味着在控制台屏幕上显示值(通常)。写入标准输出意味着在控制台屏幕上显示值(通常)