成员变量和静态变量的区别:https://www.cnblogs.com/NYfor2018/p/9481069.html
上述网址为摘抄他人 为方便大家学习所用 如有侵权 联系必删
java代码解释第四项:调用方式不同
package com.test.project;
public class test1 {
static char a;
int c;
public int getC() {
return c;
}
public void setC(int c) {
this.c = c;
}
public static void main(String[] args) {
test1 t = new test1();
t.setC(10);
int cc = t.getC();
System.out.println(cc);
test1.a = '\u0031';
char b = '我';
System.out.println(a);
System.out.println(b);
}
}
输出结果:
10
1
我