Rabu, 17 April 2013

Program di bawah ini untuk mengetahui nama komputer lokal.



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());
}
}

Tidak ada komentar:

Posting Komentar