Question: JAVA Modify the toString() method above so that it * returns a useful message even if name and year of birth are null. public String
JAVA
Modify the toString() method above so that it * returns a useful message even if name and year of birth are null.
public String toString() { return this.name + "(Born " + this.yearOfBirth + ")"; }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
