Java URL equals() MethodThe equals() method of URL class compares this URL for equality with another URL object. It returns false if the given object is not a URL. If IP address of two different is same, then it considered equivalent host. SyntaxOverridesequals in class Object Parameterobj - the URL to compare against. Returnstrue if the objects are the same; false otherwise. Example 1Test it NowOutput: Matching url : true
Next TopicJava URL Class
|