曦~妍  

2016年5月13日

摘要: 1 String str="asdfghjklzxcvbnmqwertyuiop"; 2 if(str.indexOf("asd")==0); 3 { 4 System.out.println("判断字符串的开头为:"+str.indexOf("asd")); 5 } 6 System.out.println("判断字符... 阅读全文
posted @ 2016-05-13 22:49 曦~妍 阅读(582) 评论(0) 推荐(0) 编辑
 
摘要: 二次输出: 阅读全文
posted @ 2016-05-13 22:47 曦~妍 阅读(165) 评论(0) 推荐(0) 编辑
 
摘要: 值类型和引用类型的区别 每一个值类型都有一个独立的内存区域保存自己的值,调用它的时候调用的是他的值,而引用类型调用的是内存中的地址。 【回目录】 言归正传,咱还是先来探讨探讨这二者之间有什么区别吧。记得有一次电话面试中,我直接跟面试官说:“值类型是现金,引用类型是存折”,后来想想当时说这话虽是有点儿 阅读全文
posted @ 2016-05-13 22:10 曦~妍 阅读(5975) 评论(0) 推荐(1) 编辑
 
摘要: 1 Scanner sc=new Scanner(System.in); 2 String a="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; 3 4 for(int i=0;i<4;i++) 5 { 6... 阅读全文
posted @ 2016-05-13 08:45 曦~妍 阅读(825) 评论(0) 推荐(0) 编辑
 
摘要: 1 Scanner sc=new Scanner(System.in); 2 Random r=new Random(); 3 int[] arr=new int[6]; 4 for(int i=0;i<6;i++) 5 { 6 arr[i]=r.nextInt(36); 7 ... 阅读全文
posted @ 2016-05-13 08:42 曦~妍 阅读(131) 评论(0) 推荐(0) 编辑