62,631
社区成员
发帖
与我相关
我的任务
分享
- public class Cygnus{
- static int value = 9; //注意value是静态的成员变量
- public static void main(String[] args) throws Exception{
- new Cygnus().printValue();
- }
- private void printValue(){
- int value = 69;
- System.out.println(this.value);
- }
- }
- public class User {
- private String user;
- private String password;
- public String getUser() {
- return user;
- }
- public void setUser(String user) {
- this.user = user;
- }
- public String getPassword() {
- return password;
- }
- public void setPassword(String password) {
- this.password = password;
- }
- }