Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.net.MalformedURLException;
- import java.net.URL;
- class Playground {
- final static String urls[][] = {
- {"facebook.com", "m.facebook.com"},
- {"www.google.com", "www.l.google.com"},
- {"www.ilfattoquotidiano.it", "www.ilfattoquotidiano.it.cdn.cloudflare.net."},
- };
- public static void main(String[ ] args) throws MalformedURLException {
- for (String url[] : urls)
- System.out.println(url[0] + " == " + url[1] + ": " +
- new URL("https://" + url[0]).equals(new URL("https://" + url[1]))
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement