摘要: //例1——实例方法能够被覆盖 class Super{ String name(){ return "mother"; } } class Sub extends Super{ String name(){ return "baby"; } }... 阅读全文
posted @ 2015-09-20 22:58 iucforever 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 问题: 编程求一个整数数组的最大值、最小值、平均值和所有元素的和。 代码: public class Page99{ public static void main(String args[]){ int NumArray[]=new int[]{32,94,15,86,1533,-98,143,140,1... 阅读全文
posted @ 2015-09-20 00:14 iucforever 阅读(135) 评论(0) 推荐(0) 编辑
摘要: 问题: 利用二维非矩阵数组输出下面的数字 0 1 2 2 3 4 3 4 5 6 代码: public class Page98{ public static void main(String args[]){ int NumArray[][] = new int [4... 阅读全文
posted @ 2015-09-20 00:13 iucforever 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 问题: 将一个数字与数组中的元素比较, 如果该数字存在数组中,给出该数字在数组中的位置; 如果该数字不在数组中,给出提示。 代码: public class Page84{ public static void main(String args[]){ int Num = 12; int Num... 阅读全文
posted @ 2015-09-20 00:11 iucforever 阅读(334) 评论(0) 推荐(0) 编辑