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

浙公网安备 33010602011771号