This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package sandbox; | |
import java.lang.reflect.Field; | |
import java.lang.reflect.Modifier; | |
public class MainSandBox { | |
public static void main(String[] args) throws Exception { | |
Example ex = new Example(); | |
// Change private modifier to public | |
Field f = ex.getClass().getDeclaredField("id"); |