Skip to content

Instantly share code, notes, and snippets.

@Dark32
Last active December 28, 2015 09:58
Show Gist options
  • Save Dark32/7482346 to your computer and use it in GitHub Desktop.
Save Dark32/7482346 to your computer and use it in GitHub Desktop.
Object test = new Object(){public String sS = "4";};
//String str = test.sS;
Field f = test.getClass().getDeclaredField("sS");
f.setAccessible(true);
String str = (String)f.get(obj);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment