Getting value of public static final field/property of a class in Java via reflection

Posted by Viet on Stack Overflow See other posts from Stack Overflow or by Viet
Published on 2010-04-21T17:57:32Z Indexed on 2010/04/21 18:03 UTC
Read the original article Hit count: 243

Filed under:
|
|
|

Say I have a class:

public class R {
    public static final int _1st = 0x334455;
}

How can I get the value of the field/property "_1st" via reflection?

© Stack Overflow or respective owner

Related posts about java

Related posts about reflection