How does one access the Class object associated with a primitive type? This can be necessary when using reflection.
Wednesday, March 26, 2014
Subscribe to:
Post Comments (Atom)
How does one access the Class object associated with a primitive type? This can be necessary when using reflection.
2 comments:
That's not a hard one ;-)
System.out.println(int.class.getName());
There is also Integer.TYPE, or Class.getPrimitiveClass(name)
Post a Comment