Trying to convert a received DatagramPacket to string, but I have a small problem. Not sure what\'s the best way to go about it.
The data I\'ll be receiving is most
Use this Code instead
buffer = new byte[1024]; packet = new DatagramPacket(buffer, buffer.length); socket.receive(packet); String data = new String(packet.getData()); System.out.println("Received: "+data);