+ 1
Java related
what do I need to to print an object like TestServer user = new TestServer(); system.out.println(user); do i need display method or toString method for displaying my user?
1 Answer
0
You have made an object called user. Now you can display its properties or methods if they exist in TestServer Class. for example if TestServer has a variable named String name = "ABC"; Then you can display it by System.out.println(User.name);