I'm trying to create a a method that combines the first and last name variables to create a fullName variable but I keep getting null whenever instead of the full name? I'm not getting any actual errors so I don't know where it's going wrong?
@Override
public String toString() {
return String.format("%-22s %.2f %-4s %s", fullName, gpa, major, year);
}
public void setfirstName(String firstName) {
this.firstName = firstName;
}
public String getfirstName() {
return firstName;
}
public void setlastName(String lastName) {
this.lastName = lastName;
}
public String getlastName() {
return lastName;
}
public void setfullName(String fullName) {
fullName = (lastName + ", " + firstName);
}
public String getfullName() {
return fullName;