量,常量,作用域
public class Demo05 {
public static void main(String[] args) {
int a=1,b=2,c=3;
String name="吕义昌";
char x='X';
double y=3.14;
}
}
import org.w3c.dom.ls.LSOutput;
public class Demo06 {
static double salary=2500;
String name;
int age;
public static void main(String[] args) {
int i=10;
System.out.println(i);
Demo06 demo06=new Demo06();
System.out.println(demo06.age);
System.out.println(demo06.name);
System.out.println(salary);
}
public void add(){
}
}
public class Demo07 {
static final double pai=3.14;
public static void main(String[] args) {
System.out.println(pai);
}
}