Skip to content

Instantly share code, notes, and snippets.

@orlandocr
Created September 23, 2015 16:35
Show Gist options
  • Save orlandocr/a0ed642bd8a09973df27 to your computer and use it in GitHub Desktop.
Save orlandocr/a0ed642bd8a09973df27 to your computer and use it in GitHub Desktop.
public class BlowYourMind {
public static void main(String[] args) {
String str1 = "http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8";
String str2 = "​http://devimages.apple.com.edgekey.net/streaming/examples/bipbop_16x9/bipbop_16x9_variant.m3u8";
System.out.println("str1.hashCode() " + str1.hashCode());
System.out.println("str2.hashCode() " + str2.hashCode());
System.out.println("str1.equals(str2) " + str1.equals(str2));
}
}
@alvaro-araya
Copy link

for (int i = 0; i < str1.length(); i++) {
System.out.println(i
+ " str1: '" + str1.charAt(i) + "' code[" + Character.getNumericValue(str1.charAt(i)) + "] "
+ " str2: '" + str2.charAt(i) + "' code[" + Character.getNumericValue(str2.charAt(i)) + "] "
);
}
// :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment