疑惑,变量的调用
static String className = "JAVA开发一班"; public static void main(String[] args) { System.out.println( className ) ; System.out.println(Demo.className ) ; Demo d = new Demo(); System.out.println(d.className ) ; }}为什么这三种调用方式都成立呢?
static String className = "JAVA开发一班"; public static void main(String[] args) { System.out.println( className ) ; System.out.println(Demo.className ) ; Demo d = new Demo(); System.out.println(d.className ) ; }}为什么这三种调用方式都成立呢?
2017-03-13
举报