URI Equals() Example
Tests this URI for equality with another object.
URIclass Equals() method example. This example shows you how to use Equals() method.This method Tests this URI for equality with another object.
Here is the code:-
/**
* @Program that Compares this URI to another object, which must be a URI.
* Equals.java
* Author:-RoseIndia Team
* Date:-23-jun-2008
*/
import java.net.*;
public class Equals {
public static void main(String[] args) throws Exception {
URI u = new URI("http://java.sun.com/j2se/1.3");
URI u1 = new URI("http://java.sun.com/j2se/1.3");
System.out.println("Object equals: " + u.equals(u1));
}
} |
|