Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Main {
- public static void main(String[] args) {
- try {
- java.net.InetAddress inetAdd = java.net.InetAddress.getByName("www.apple.com");
- System.out.println("IP Address is: " + inetAdd.getHostAddress());
- } catch (java.net.UnknownHostException e) {
- System.err.println(e);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement