iamgoodatthis
Programmer
Hello. I'm getting an unexpected NullPointerException when using the receive method from DatagramSocket. Here is my code:
DatagramPacket waiting = null;
try
{
DatagramSocket socketReceive = new DatagramSocket(100);
socketReceive.receive(waiting);
}
catch(IOException e)
{
}
The exact error is NullPointerException in DatagramSocket, receive method line 647. All help would be appreciated.
Thanks.
DatagramPacket waiting = null;
try
{
DatagramSocket socketReceive = new DatagramSocket(100);
socketReceive.receive(waiting);
}
catch(IOException e)
{
}
The exact error is NullPointerException in DatagramSocket, receive method line 647. All help would be appreciated.
Thanks.