package com.OOP;
public class Student {
private static int age;
public double score;
public static void main(String[] args) {
Student xiaoma = new Student();
System.out.println(Student.age);//静态变量与类同时存在,所以建议用类来调用
//System.out.println(Student.score);
// 非静态变量只有使用时才会分配空间所以不能用类调用
System.out.println(xiaoma.score);//此时使用了score,就分配了空间;
}
}



