正在加载图片...
URL的构造方法 public Url(String protocol, String host, String file) public url(String protocol, String host, int port, String file) 直接指定每个域的内容,而不是直接给出一个 字符串来表示。必须给出确定的传输协议、机 器名称、文件名,或者加上端口 比如以:http:/java.sun.com:80/whitepaper/javawhitepAper1.htm为例,构造方式为 Urlurl3=newUrlchTtp",javA.sun.com",80,/whitepaper/javawhitepaper1.html")URL的构造方法 ▪ public URL(String protocol, String host, String file) ▪ public URL(String protocol, String host, int port, String file) ▪ 直接指定每个域的内容,而不是直接给出一个 字符串来表示。必须给出确定的传输协议、机 器名称、文件名,或者加上端口号 比如以:http://java.sun.com:80/whitePaper/Javawhitepaper_1.html为例,构造方式为: URL url3 = new URL("http","java.sun.com",80,"/whitePaper/Javawhitepaper_1.html");
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有