Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. public class R {
  2. public static final int _1st = 0x334455;
  3. }
  4.  
  5. Field f = R.class.getField("_1st");
  6. Class<?> t = f.getType();
  7. if(t == int.class){
  8. System.out.println(f.getInt(null));
  9. }else if(t == double.class){
  10. System.out.println(f.getDouble(null));
  11. }...
  12.  
  13. R.class.getField("_1st").get(null);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement