static详解 static详解 静态属性调用 静态方法调用 代码块 静态导入包 static详解 静态属性调用 package com.ts; public class Application { private static int age;//静态的变量 private double score;//非静态的变量 public static void main(String[] args) { Application a = new Application(); System.out.println(Application.age); System.out.println(Application.score);//报错 System.out.println(a