摘要:
### 冒泡排序 ``` class ArrayUtil { public static void sort(int data[]){ for(int x = 0; x < data.length;x++){ for(int y = 0; y < data.length - x - 1;y++){/ 阅读全文
摘要:
### demo1 ``` public class HelloWorld { public static void main(String[] args){ // 对于引用数据类型而言,主要的特点是可以与方法进行引用传递 // 而数组本身也是引用数据类型 // demo:实现一个数组的引用传递 i 阅读全文
摘要:
* 定义一个静态的二维数组,并用2种循环语句给输出 ``` public class HelloWorld { public static void main(String[] args){ int data [][] = new int [][] { {1,2,3,4,5},{4,5,6} , { 阅读全文
摘要:
* 说的是foreach,实际代码中写的仍然是: for ``` public class HelloWorld { public static void main(String[] args){ int data [] = new int [] {1,2,3,4,5}; for(int temp 阅读全文
摘要:
* 数组是引用传递 ``` public class HelloWorld { public static void main(String[] args){ // 数组是引用数据类型;就一定会发生引用传递; int data [] = new int [] {10,20,30}; int temp 阅读全文
摘要:
``` public class HelloWorld { public static void main(String[] args){ //int data [] = {1,2,3};// 静态初始化 - 简略格式 int data [] = new int [] {11,22,33};// 静 阅读全文