The following code snippet returns 46059 on Java 6 and 48757 on Java 7. Any ideas what might have changed?
int i = 0;
for(char c = Character.MIN_VALUE; c < Character.MAX_VALUE; c++){
if(Character.isLetterOrDigit(c)){
i++;
}
}
System.out.println(i);
I suspect this document holds the answer:
New Scripts and Characters from Unicode 6.0.0
Early versions of the Java SE 7 release added support for Unicode 5.1.0. The final version of the Java SE 7 release supports Unicode 6.0.0. Unicode 6.0.0 is a major version of the Unicode Standard and adds support for over 2000 additional characters, as well as support for properties and data files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With