Koding GetIP import java.net.*; public class getip { public static void main(String args[]) throws Exception { InetAddress host = null; host = InetAddress.getLocalHost(); byte ip[] = host.getAddress(); for (int i=0; i<ip.length; i++) { if (i > 0) { System.out.print("."); } System.out.print(ip[i] & 0xff); } System.out.println(); } } Kodingan diatas digunakan untuk mendapatkan alamat ip address . didalam kodingan ini ip address di masukan null yang artinya belum ditentukan alamat ip addressnya, kemudian baru program akan mendapatkan alamat ip address dari localhost pada komputer masing-masing. Output Koding GetName import java.net.*; public class getName { public static void main(String args[]) throws Exception { InetAddress host = null; host = InetAddress.getLocalHost(); System.out.println("Nama komputer Anda: " + host.getHostName()); } } ...