摘要: String a = "abc";String b = "abc";a==b ;//返回true,因为a,b指向的是同一个地址 String a = new String("abc");String b = new String("abc");a==b;//返回false,因为a,b指向的不是同一个 阅读全文
posted @ 2018-02-03 21:28 biubiubiuo 阅读(263) 评论(0) 推荐(0) 编辑
摘要: public class Dog { public void Age(int age) {//副本新建的age age++;//对副本修改 System.out.println(age); } public void arrDemo(int[] arr) { arr[2] = 100;//对堆里的数据修改 for(int i =0;i<arr.length;i++) {... 阅读全文
posted @ 2018-02-03 19:59 biubiubiuo 阅读(783) 评论(0) 推荐(0) 编辑
摘要: public class Array2Demo2_3 { public static void main(String[] args) { //定义初始化 int[][] arr = new int[3][];//定义高维数组 arr[0] = new int[2];//高位数组下定义低维数组 arr[1... 阅读全文
posted @ 2018-02-03 17:37 biubiubiuo 阅读(173) 评论(0) 推荐(0) 编辑
摘要: import java.util.Arrays; public class ArrayDemo2_3 { public static void main(String []args) { // 冒泡排序 int[] num1 = new int[]{2,6,7,9,8,3,1,10}; for(in 阅读全文
posted @ 2018-02-03 14:27 biubiubiuo 阅读(237) 评论(0) 推荐(0) 编辑