FileDocCategorySizeDatePackage
URLEquality.javaAPI DocExample563Thu Apr 03 15:16:00 BST 1997None

URLEquality

public class URLEquality extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)


    try {
      URL sunsite = new URL ("http://sunsite.unc.edu/javafaq/oldnews.html");
      URL helios = new URL("http://helios.oit.unc.edu/javafaq/oldnews.html");
      if (sunsite.equals(helios)) {
        System.out.println
          (sunsite + " is the same as " + helios);
      }
      else {
        System.out.println
          (sunsite + " is not the same as " + helios);
      }
    }
    catch (MalformedURLException e) {
      System.err.println(e);
    }