목록네트워킹 (1)
삶 가운데 남긴 기록 AACII.TISTORY.COM

InetAddress import java.net.InetAddress; import java.net.UnknownHostException; public class InetAddressEx { public static void main(String[] args) { try { InetAddress local = InetAddress.getLocalHost(); System.out.println("호스트 주소: "+local.getHostAddress()); InetAddress[] iaArr = InetAddress.getAllByName("www.google.co.kr"); for(InetAddress remote:iaArr) { System.out.println("구글 주소: "+remote.getH..
DEV&OPS/Java
2022. 5. 20. 17:33