我是 java 的绝对初学者,需要帮助添加字符串实例变量。我什至真的不知道如何问我的问题,但是
public class Account {
private int AccountNumber;
private int FirstName;
private int LastName;
// ok here is where im stuck, i realize that Firstname and LastName are not integers but how else can i make a instance variable of them?
private double balance;
public Account(double initialBalance, int getFirstName, int getLastName, int getAccountNumber) {
//Int is not the correct type for FirstName and LastName but I dont know what else to call it. Any ideas?
FirstName = getFirstName;
LastName = getLastName;
AccountNumber = getAccountNumber;
}