5fanily,封装,==equal.rar
/* 定义有final的变量为最终变量不能为其赋值. */ class Test1 { int a =88;//定义变量是必须初始化值 // a= 88; } public class Test { public static void main(String args[]) { Test1 t1=new Test1(); //t1.a=33;//无法为最终变量 a 指定值 System.out.println(t1.a); } }
下载地址
用户评论