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 |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India