Farakh khan wrote:
You are missing things here. Your class ServerLocation isn't even storing the values that you pass to the setter methods - it just prints the values and forgets about them.
You need to add
member variables to the class, and in the setter methods set the values of the member variables.
You also need to
implement a toString() method in the class, otherwise you get output such as "ServerLocation@4554617c" when you try to print a ServerLocation object.
(Click the links for more information).