home *** CD-ROM | disk | FTP | other *** search
/ Borland JBuilder 6 / jbuilder6.iso / Documents / JAVA Programming / examples / 14 / myURL.java < prev    next >
Encoding:
Java Source  |  2000-09-08  |  394 b   |  11 lines

  1. import java.net.URL;
  2. class myURL {
  3. public static void main(String args[]) throws Exception {
  4. URL hp = new URL("http://coop.chuvashia.edu");
  5. System.out. println("Protocol: " + hp.getProtocol());
  6. System.out.println("Port: " + hp.getPort());
  7. System.out.println("Host: " + hp.getHost());
  8. System.out.println("File: " + hp.getFile());
  9. System.out.println("Ext: " + hp.toExternalForm());
  10. } }
  11.