2015. 1. 25. 16:56
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
package InetAddress;
import java.net.InetAddress;
public class getLocalHost {
public static void main(String[] args){
try {
InetAddress me=InetAddress.getLocalHost();
String dottedQuad=me.getHostAddress();
System.out.println("My address is "+dottedQuad);
} catch (Exception e) {
e.printStackTrace();
}
}
}
'Java' 카테고리의 다른 글
new URL(String spec) throws MalformedURLException (0) | 2015.01.25 |
---|---|
InetAddress : isReacheable(int timeout) (0) | 2015.01.25 |
InetAddress : getHostName() (0) | 2015.01.25 |
InetAddress : getHostAddress() (0) | 2015.01.25 |
InetAddress : getCanonicalHostName() (0) | 2015.01.25 |