Skip to content

Commit

Permalink
Create StringTest2.java
Browse files Browse the repository at this point in the history
  • Loading branch information
zxh0 committed Dec 4, 2019
1 parent 373df6a commit 129b147
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package stdlib.basic.string;

public class StringTest2 {

public static void main(String[] args) {
String s = "\uD800";
System.out.println(s.length());
System.out.println((int)s.charAt(0)); // 55296
}

}

0 comments on commit 129b147

Please sign in to comment.