摘要: 一、前言 二、内部类定义内部类定义非常简单,就是把一个类的定义放在另外一个外围类定义的里面。如下面代码所示:class OutterClass { class InnerClass { }}你可能会想,内部类和组合有什么区别?就这么简单把内部类的定义放在外部类里面,能惹出多少事儿来?诶,你还别说,还 阅读全文
posted @ 2017-03-28 22:53 *小嘻嘻* 阅读(135) 评论(0) 推荐(0) 编辑
摘要: package interfaceDemo; interface Equipment_specifications{ void DoWork(); } class MBorad{//主板 private static int index;//定义一个变量 private static Equipment_specifications[] es=new Equipment_specifi... 阅读全文
posted @ 2017-03-28 22:22 *小嘻嘻* 阅读(430) 评论(0) 推荐(0) 编辑
摘要: package interfaceDemo; interface Greepy{//创建一个接口,趴行动物 void run();//不能有方法体,跑的行为 } interface Aquatic{//水生动物 void swim();//游泳的行为public static //String name="www";//同等于:public static final Stri... 阅读全文
posted @ 2017-03-28 20:31 *小嘻嘻* 阅读(303) 评论(0) 推荐(0) 编辑
摘要: http://www.cnblogs.com/maowang1991/archive/2013/04/15/3023236.html 阅读全文
posted @ 2017-03-28 15:07 *小嘻嘻* 阅读(544) 评论(0) 推荐(0) 编辑
摘要: int 是基本数据类型Integer是其包装类,注意是一个类。为什么要提供包装类呢???一是为了在各种类型间转化,通过各种方法的调用。否则 你无法直接通过变量转化。比如,现在int要转为Stringint a=0;String result=Integer.toString(a);在java中包装类,比较多的用途是用在于各种数据类型的转化中。我写几个demo//通过包装类来实现转化的 int n... 阅读全文
posted @ 2017-03-28 11:25 *小嘻嘻* 阅读(266) 评论(0) 推荐(0) 编辑
摘要: package integer; public class baozhuang { public static void main(String[] args) { System.out.println(Integer.MAX_VALUE); System.out.println(Integer.MIN_VALUE); System.out.println(Integer.TY... 阅读全文
posted @ 2017-03-28 09:27 *小嘻嘻* 阅读(170) 评论(0) 推荐(0) 编辑