MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

/*
 * Output:
 * 
 * 
 * name/132.81.162.18
 */

import java.net.InetAddress;

public class MainClass {
    public static void main(String args[]) throws Exception {
        InetAddress myAddress = InetAddress.getLocalHost();
        System.out.println(myAddress);
    }
}