Johannes Thorén wrote:I call the run method in both, but thats not the problem. I cant print the msg.toString() since its on the server side. But when i print the byte by sending it back out.write(msg) i get "start_game". But the comparing does not work. It doesint return 0 even tho their equal.
"start_game".compareTo(msg.toString())
Joanne
Johannes Thorén wrote:msg is an array of bytes containing "start_game". So msg.toString() should contain a string with the content "start_game" right?
Harsha Smith wrote:
Johannes Thorén wrote:msg is an array of bytes containing "start_game". So msg.toString() should contain a string with the content "start_game" right?
wrong. Look at the above piece of code
Harsha Smith wrote:y don't use equalsIgnoreCase or contains method instead of compareToIgnoreCase?