DatagramPacket receivePacket = new DatagramPacket(receiveData,
receiveData.length);
_socket.receive(receivePacket);
String sentence = new String(receivePacket.getData());
InetAddress IPAddress = receivePacket.getAddress();
int port = receivePacket.getPort();
if(sentence.equals("hello")) (...)
質問:sentence.equal("hello")
文が の場合、なぜ真ではないのです"hello"
か? String の Constructor が原因String(byte[])
ですか?
誰に対処できますか?
ありがとう