How to print String instead of address in Java?
问题 My output is "[B@b42cbf" with no errors. It should be a string that says "Server Check". How do I fix my code to put out the string rather than the address? My code to print the object has been changed several times, but is now as follows. System.out.println(packet.getMessage().toString()); My packet class is as follows. import java.io.Serializable; public class Packet implements Serializable { final public short MESSAGE = 0; final public short COMMAND = 1; private String _ip; private short