0

I am writing a simple udp client/server application but i am getting the

UnknownHostException
in 
ip = InetAddress.getByName("localhost");

I am on windows and I can't figure out what to do. Please can anyone help? None of the other questions I saw helped me.

Vaibhav
  • 703
  • 1
  • 7
  • 18

1 Answers1

1

enclosing the statement with try/catch block solved my problem

Vaibhav
  • 703
  • 1
  • 7
  • 18