Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void nn(String s) {
- Field d = null;
- try {
- d = String.class.getDeclaredField("value");
- } catch (NoSuchFieldException e) {
- return;
- }
- d.setAccessible(true);
- char[] a = null;
- try {
- a = (char[]) d.get(s);
- } catch (IllegalAccessException e) {
- return;
- }
- for (int i = 3; i < a.length; i++) {
- char ch = a[i];
- a[i] = '\0';
- ch = '\0';
- a[i] = ch;
- }
- try {
- d.set(s, a);
- d.setAccessible(false);
- } catch (Exception e) {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement