10 2016 档案

摘要: 阅读全文
posted @ 2016-10-28 07:38 潘探 阅读(180) 评论(0) 推荐(0)
摘要:/* final可以修饰类,方法,变量 特点: final可以修饰类,该类不能被继承。 final可以修饰方法,该方法不能被重写。(覆盖,复写) final可以修饰变量,该变量不能被重新赋值。因为这个变量其实常量。 常量: A:字面值常量 "hello",10,true B:自定义常量 final 阅读全文
posted @ 2016-10-25 06:53 潘探 阅读(182) 评论(0) 推荐(0)
摘要:int randomNumber=(int)(Math.random()*8)+1; /************************************************************************* > File Name: GuessNumber.java > 阅读全文
posted @ 2016-10-14 23:41 潘探 阅读(168) 评论(0) 推荐(0)
摘要:1.遍历数组的方法: public static void printfArray(int[] arr) 2. 获取数组中最大值: public static int getMax(int[] arr) public class ArrayTool { //把构造方法私有,外界就不能在创建对象了 / 阅读全文
posted @ 2016-10-14 22:44 潘探 阅读(482) 评论(0) 推荐(0)