Get the hostname from ip Java

后端 未结 0 1456
北荒
北荒 2021-01-29 05:00

How can I get the hostname from the url using Java. I tried below:

InetAddress.getByName(new URL(url).getHostName());

This works only if the host

相关标签:
回答
  • 消灭零回复
提交回复
热议问题