Assume you have a programmer-defined class named Person. Assume this class includes a name instance variable, initialized

Question:

Assume you have a programmer-defined class named Person. Assume this class includes a name instance variable, initialized by the constructor’s name parameter. Suppose a driver fills a people array with Person objects. Then the driver goes back through the array and uses System.out.println(people[i]); to print the people’s names. Unfortunately, what the driver prints is Something like this:

Person@65ae6ba4 

Person@512ddf17 

Person@2c13da15 

Person@77556fd 

What is the problem and how can you fix it?

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: