Created
October 10, 2014 07:23
-
-
Save limingzju/ecd6891495d8e1fedc55 to your computer and use it in GitHub Desktop.
dns
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.net.InetAddress; | |
import java.net.UnknownHostException; | |
public class TestNet { | |
public static void main(String[] args) throws UnknownHostException { | |
InetAddress[] machines = InetAddress.getAllByName("lbs.yxgslb.netease.com"); | |
for (InetAddress address : machines) { | |
System.out.println(address.getHostAddress()); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment