X1101: Debugging Scope- Person toString

This Person class stores a String name and an int id. However the toString() method is not working correctly. The toString() method should return a string containing the person's name, a colon, and their ID number. For example, if we had the following Person object:

Person lisa = new Person("Lisa", 443);

Then lisa.toString() should return "Lisa: 443". Fix the toString() method.

Your Answer:

Feedback

Your feedback will appear here when you check your answer.