Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.net.InetAddress;
import java.net.UnknownHostException;

public class Main {

    public static void main(String args[]) {

        try {
            InetAddress inetAddr = InetAddress.getByName("www.java2s.com");
            System.out.println(inetAddr.toString());

        } catch (UnknownHostException ex) {

        }
    }
}