每日总结

今天复习的是类的属性,类的属性分为两类:成员属性和局部变量,他们的作用范围不同。

学习了this关键字的作用和使用方法,主要用于构造函数中。

public class Account {
private String accountID;
private String accountname;
private String operatedate;
private int operatetype;
private String accountpassword;
private int accountbalance;
private int amount;
public Account(String accountID, String accountname, String operatedate, int operatetype, String accountpassword,
int accountbalance, int amount) {
super();
this.accountID = accountID;
this.accountname = accountname;
this.operatedate = operatedate;
this.operatetype = operatetype;
this.accountpassword = accountpassword;
this.accountbalance = accountbalance;
this.amount = amount;
}
public Account(String accountID, String accountname, String operatedate, int operatetype, int amount) {
super();
this.accountID = accountID;
this.accountname = accountname;
this.operatedate = operatedate;
this.operatetype = operatetype;
this.amount = amount;
}

原文地址:https://www.cnblogs.com/lxywsx/p/14175368.html