JAVA 学习课件 之 第六章__数组-2012.pptxVIP

  • 1
  • 0
  • 约小于1千字
  • 约 20页
  • 2018-01-09 发布于河南
  • 举报
JAVA 学习课件 之 第六章__数组-2012

第六章 数组;数组基本操作;数组基本操作;Example: Testing Arrays;数组基本操作;数组参数传递;public class Test { public static void main(String[] args) { int x = 1; // x represents an int value int[] y = new int[10]; // y represents an array of int values ? m(x, y); // Invoke m with arguments x and y ? System.out.println(x is + x); System.out.println(y[0] is + y[0]); } ? public static void m(int number, int[] numbers) { number = 1001; // Assign a new value to number numbers[0] = 5555; // Assign a new value to numbers[0] } };Returning an Array from a Method;从方法中返回数组;Example: Counting Occur

文档评论(0)

1亿VIP精品文档

相关文档