12 2013 档案

摘要:下面是代码,不过没有字母表的顺序排列:package com.example.getcontacts;import java.io.FileWriter;import java.io.IOException;import java.io.InputStream;import java.util.ArrayList;import android.app.Activity;import android.content.ContentResolver;import android.content.ContentUris;import android.content.Context;import an 阅读全文
posted @ 2013-12-05 21:45 LarryLawrence 阅读(331) 评论(0) 推荐(0)
摘要:ArrayList是所谓的动态数组。用一个小例子:import java.util.ArrayList;import java.util.Iterator;import java.util.List;class arraylist{ public static void main(String args[]) { List list = new ArrayList(); list.add("zhoushiwen"); list.add("comes again today!"); list.add("i am so neverous!" 阅读全文
posted @ 2013-12-05 20:47 LarryLawrence 阅读(223) 评论(0) 推荐(0)
摘要:reference的overview是:A mapping from String values to various Parcelable types.1.看了一篇文章(http://blog.csdn.net/randyjiawenjie/article/details/6651437),了解到它可以存储键值对:Bundle mBundle = new Bundle(); mBundle.putString("Data", "data from TestBundle"); //传值给另一个Activity:Intent intent = new In 阅读全文
posted @ 2013-12-02 21:21 LarryLawrence 阅读(309) 评论(0) 推荐(0)
摘要:java.io中有四个重要的抽象类:InputStream(字节输入流)Reader(字符输入流)OutputStream(字节输出流)Writer(字符输出流)其中,InputStream和Reader为子类提供read()方法,OutputStream和Writer为子类提供write()方法。1.文件字节流:包含FileInputStream类和FileOutputStream类。2.文件字符流:包含FileReader和FileWriter。3.缓冲流:包含BufferedReader和BufferedWriter。4.数组流:ByteArrayInputStream和ByteArra 阅读全文
posted @ 2013-12-01 19:58 LarryLawrence 阅读(406) 评论(0) 推荐(0)