摘要: <TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="www.baidu.com" android:autoLink="web" android:layout_ 阅读全文
posted @ 2016-11-03 14:58 造西 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 1.try-catch实现异常捕捉 public class ExceptionDemo { public static void main(String[] args) { try { Scanner input = new Scanner(System.in); System.out.print 阅读全文
posted @ 2016-11-03 14:20 造西 阅读(60) 评论(0) 推荐(0) 编辑
摘要: 1.包装类 public class BaoZhuangLei { public static void main(String[] args) { /* * 装箱:把基本数据类型转换为对应的对象类型 * 作用:1.在需要使用对象类型的时候,转换成对应的对象类型(在集合里面) * 2.在转换完成后, 阅读全文
posted @ 2016-11-03 14:16 造西 阅读(101) 评论(0) 推荐(0) 编辑
摘要: public class SetTest { public static void main(String[] args) { //HashSet:哈希表是通过使用称为散列法的机制来存储信息 //元素并没有以某种特定顺序来存放; HashSet<String> hs = new HashSet<St 阅读全文
posted @ 2016-11-03 14:12 造西 阅读(105) 评论(0) 推荐(0) 编辑
摘要: public class MapTest { @SuppressWarnings("rawtypes") public static void main(String[] args) { //HashMap System.out.println(" HashMap无序输出 "); HashMap<S 阅读全文
posted @ 2016-11-03 14:11 造西 阅读(87) 评论(0) 推荐(0) 编辑
摘要: public class LinkedListTest { public static void main(String[] args) { LinkedList<String> linkedList = new LinkedList<String>(); //共有的方法 linkedList.ad 阅读全文
posted @ 2016-11-03 14:10 造西 阅读(73) 评论(0) 推荐(0) 编辑
摘要: public class ArrayListTest { public static void main(String[] args) { ArrayList<String> arrayList = new ArrayList<String>(); //ArrayList arrayList = n 阅读全文
posted @ 2016-11-03 14:09 造西 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 1. public class Animal { public String type; public int weight; public void shape(){ System.out.println("品种为"+type); System.out.println("体重为"+weight); 阅读全文
posted @ 2016-11-03 14:06 造西 阅读(91) 评论(0) 推荐(0) 编辑
摘要: public class CH05_1 { public static void main(String[] args) { Scanner input=new Scanner(System.in); //第一种 String s = "helloworld"; System.out.println 阅读全文
posted @ 2016-11-03 14:03 造西 阅读(103) 评论(0) 推荐(0) 编辑
摘要: public class CH04_1 { public static void main(String[] args) { //比较两个数组是否相等 int [] num1 = {1,2,3,4,5}; int num2 [] = {1,2,3,4,5}; boolean eq = Arrays. 阅读全文
posted @ 2016-11-03 13:56 造西 阅读(164) 评论(0) 推荐(0) 编辑