public static void main(String[] args){
//局部变量作用域
}
public class Hello{
//布尔值默认是false
String name;
int age;
public static void main(String[] args){
Hello hello = new Hello();
System.out.println(hello.age);//0
System.out.println(hello.name);//null
}
}
public class Hello {
static double salary =2500;
}
//final 变量名 = 值;
final double PI = 3.14 ;
原文:https://www.cnblogs.com/chibadream/p/14379717.html