- final 定义不能被继承的类;不能被覆写的方法,常量
- 最重要作用,定义全局常量
public class HelloWorld {
public static final String INFO = "mldn";// 定义全局常量;
public static void main(String args[]){
String strA = "www.mldn.cn";
String strB = "www." + INFO + ".cn";
System.out.println(strA == strB);// true
}
}