摘要: 有时候就爱钻牛角尖,今天在子类中重写接口中的方法,加上@override竟然错误,虽然不加也是正确的,但是就是看着不舒服,于是在网上查找了一下原来是jdk版本的问题,jdk5以前的版本@override不支持在子类中重写接口中的方法,jdk6就可以了,于是我修改了一下:Window——Prefere... 阅读全文
posted @ 2015-05-10 11:21 不爱吃鱼的喵 阅读(150) 评论(0) 推荐(0) 编辑
摘要: 当时看到题目的时候自己就晕了,不懂什么意思,做出来的结果竟然是一个人比好几个人,当时还觉得一个人可以打几场呢!==!后来求助大神得到了答案,共勉一下吧~~public static void main(String[] args) { for(int a = 1 ;a<=3;a++){ ... 阅读全文
posted @ 2015-04-12 14:52 不爱吃鱼的喵 阅读(1583) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { Scanner scan = new Scanner(System.in); System.out.println("请输入一个五位正整数:"); int num = scan.nextInt(); Strin... 阅读全文
posted @ 2015-04-12 14:33 不爱吃鱼的喵 阅读(1967) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { int[] a={23,34,56,7,8,9}; int[] b = new int[a.length]; Scanner scan = new Scanner(System.in); System.out.... 阅读全文
posted @ 2015-04-12 14:32 不爱吃鱼的喵 阅读(4686) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { int[][] a = new int[2][3]; int[][] b = new int[3][2]; int k = 1; System.out.println("转置前数组:"); for(int i... 阅读全文
posted @ 2015-04-12 14:26 不爱吃鱼的喵 阅读(815) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { int[] a = {1,3,5,7,9,19,29,70}; int[] b = new int[a.length+1]; Scanner scan = new Scanner(System.in); Sys... 阅读全文
posted @ 2015-04-12 14:21 不爱吃鱼的喵 阅读(1068) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { int m = 0; for(int i = 2 ; i < 100 ; i++){ for(int j = 2;j <= Math.sqrt(i)+1 ;j++){ m=i % j; if(m =... 阅读全文
posted @ 2015-04-12 14:20 不爱吃鱼的喵 阅读(427) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) { int[][] a = new int[6][]; //a[0][0] = 1; for(int i=0;i<6;i++){ a[i]=new int[i+1]; } for(int i = 0 ... 阅读全文
posted @ 2015-04-12 14:19 不爱吃鱼的喵 阅读(137) 评论(0) 推荐(0) 编辑
摘要: int[] a=new int[3]; int[] b=new int[3]; int[] c = new int[a.length+b.length]; c = Arrays.copyOf(a, c.length); /*arg0 - 源数组。 ... 阅读全文
posted @ 2015-04-12 13:13 不爱吃鱼的喵 阅读(309) 评论(0) 推荐(0) 编辑