上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 20 下一页
摘要: 阅读全文
posted @ 2014-08-25 20:33 seven7seven 阅读(211) 评论(0) 推荐(0) 编辑
摘要: http://baike.baidu.com/view/7942850.htm?fr=aladdin1、内部类就是在一个类的内部定义的类。2、内部类中不能定义静态成员(方法体外定义的static nested class可以定义静态成员)。3、内部类可以直接访问外部类中的成员变量(static ne... 阅读全文
posted @ 2014-08-25 15:57 seven7seven 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 问题1 接口可以继承接口。问题2 抽象类可以实现接口。问题3 抽象类可以继承具体类,前提是实体类必须有明确的构造函数。证明:所有的类都从Object类继承的。解释“实体类必须有明确的构造函数”的含义:继承时,子类的构造方法都必须在第一行调用父类的构造方法!(第一行,也就是说只能调用一个父类构造方法,... 阅读全文
posted @ 2014-08-25 14:41 seven7seven 阅读(271) 评论(0) 推荐(0) 编辑
摘要: public class test30{ public static void main(String args[]){ int array[]={3,2,5,1,4}; int temp[] = findTopN(array,4); for(int ... 阅读全文
posted @ 2014-08-24 22:40 seven7seven 阅读(146) 评论(0) 推荐(0) 编辑
摘要: import java.util.Random;import java.util.Stack;public class test22{ private static Stack dataStack = new Stack(); public static boolean check(in... 阅读全文
posted @ 2014-08-23 23:21 seven7seven 阅读(130) 评论(0) 推荐(0) 编辑
摘要: import java.util.Random;import java.util.Stack;public class test21{ private static Stack dataStack = new Stack(); private static Stack minStack ... 阅读全文
posted @ 2014-08-23 23:02 seven7seven 阅读(163) 评论(0) 推荐(0) 编辑
摘要: //okpublic class test14{ //奇数在前偶数在后 by myself public static void reorderOddEven(int[] array){ int i=0; int j=array.length-1; ... 阅读全文
posted @ 2014-08-23 18:36 seven7seven 阅读(161) 评论(0) 推荐(0) 编辑
摘要: public class test12{ //数组解决大数问题 by myself public static void printToN1(int n){ int[] array = new int[n]; while(increment(array, 0,... 阅读全文
posted @ 2014-08-22 23:12 seven7seven 阅读(162) 评论(0) 推荐(0) 编辑
摘要: public class test11{ private static boolean invalidInput = false;//指示输入是否非法 public static double power(double base, int exponent){ if(bas... 阅读全文
posted @ 2014-08-22 20:01 seven7seven 阅读(166) 评论(0) 推荐(0) 编辑
摘要: public class test243{ //常规解法 public static int findOnesOfBinary1(int n){ int cnt = 0; int flag = 1; while(flag!=0){ ... 阅读全文
posted @ 2014-08-22 17:51 seven7seven 阅读(91) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 20 下一页