Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class R {
- public static final int _1st = 0x334455;
- }
- Field f = R.class.getField("_1st");
- Class<?> t = f.getType();
- if(t == int.class){
- System.out.println(f.getInt(null));
- }else if(t == double.class){
- System.out.println(f.getDouble(null));
- }...
- R.class.getField("_1st").get(null);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement