2015. 1. 25. 17:24
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.
package URL;
import java.net.URL;
public class getAuthority {
public static void main(String[] args){
try {
URL url=new URL("http://www.google.com");
System.out.println("URL is "+url.toString());
System.out.println("authority is "+url.getAuthority());
System.out.println("path is "+url.getPath());
System.out.println("default post is "+url.getDefaultPort());
System.out.println("query is "+url.getQuery());
System.out.println("ref is "+url.getRef());
} catch (Exception e) {
e.printStackTrace();
}
}
}
'Java' 카테고리의 다른 글
URL : openStream() (0) | 2015.01.25 |
---|---|
URL : openConnection() (0) | 2015.01.25 |
new URL(String spec) throws MalformedURLException (0) | 2015.01.25 |
InetAddress : isReacheable(int timeout) (0) | 2015.01.25 |
InetAddress : getLocalHost() (0) | 2015.01.25 |