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[] argsthrows 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));
    }
}

Output of the program:-
 Object equals: true

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US