摘要: bit、byte、位、字节、汉字的关系 1 bit = 1 二进制数据 1 byte = 8 bit 1 字母 = 1 byte = 8 bit 1 char(汉字) = 2 byte = 16 bit 字符>=字节 1个汉字字符存储需要2个字节,1个英文字符存储需要1个字节。 基本数据类型,包括数 阅读全文
posted @ 2016-04-22 13:44 F领主 阅读(180) 评论(0) 推荐(0) 编辑
摘要: str=str.substring(int beginIndex);截取掉str从首字母起长度为beginIndex的字符串,将剩余字符串赋值给str; str=str.substring(int beginIndex,int endIndex);截取str中从beginIndex开始至endInd 阅读全文
posted @ 2016-04-22 10:29 F领主 阅读(35694) 评论(0) 推荐(0) 编辑
摘要: SimpleDateFormat formatter = new SimpleDateFormat("yyyy年MM月dd日"); SimpleDateFormat formatter2 = new SimpleDateFormat("yyyy-MM-dd"); String time = form 阅读全文
posted @ 2016-04-21 17:47 F领主 阅读(215) 评论(0) 推荐(0) 编辑
摘要: package com.zeph.android.Parcelable; import android.os.Parcel;import android.os.Parcelable; public class BenParcelable implements Parcelable { public 阅读全文
posted @ 2016-04-21 17:42 F领主 阅读(509) 评论(0) 推荐(0) 编辑
摘要: abstract 里面可以定义方法,也可以实现方法,interface只能定义;abstract 的方法在子类中可以不实现,也可以重写父类的方法。而 interface 中的所有方法一定要实现,不可遗漏 阅读全文
posted @ 2016-04-14 13:56 F领主 阅读(152) 评论(0) 推荐(0) 编辑
摘要: try { //执行的代码,其中可能有异常。一旦发现异常,则立即跳到catch执行。否则不会执行catch里面的内容 } catch { //除非try里面执行代码发生了异常,否则这里的代码不会执行 } finally { //不管什么情况都会执行,包括try catch 里面用了return ,可 阅读全文
posted @ 2016-04-14 13:36 F领主 阅读(140) 评论(0) 推荐(0) 编辑