Last active
April 6, 2020 01:10
-
-
Save blackvvine/f76fbabca98f8324d0376ca75506378f to your computer and use it in GitHub Desktop.
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
public class CheckHostResolution { | |
public static void main(String[] args) { | |
try { | |
String s = InetAddress.getLocalHost().getCanonicalHostName(); | |
System.out.println(s); | |
} catch (Exception ex) { | |
System.err.println(ex); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment