Advertisement
Guest User

getName.java

a guest
Mar 26th, 2017
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.23 KB | None | 0 0
  1. import java.net.*;
  2. public class getName {
  3. public static void main(String args[]) throws Exception {
  4. InetAddress host = null;
  5. host = InetAddress.getLocalHost();
  6. System.out.println("Nama komputer Anda: " +
  7. host.getHostName());
  8. }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement