Wednesday, 7 August 2013

Meaning of new Class[0] in Reflection API

Meaning of new Class[0] in Reflection API

I came across a statement:
o1 = o1.getClass().getMethod(getter, new Class[0]).invoke(o1, new Object[0]);
Can someone please tell me what new Class[0] and new Object[0] do in this
case, where o1 is any Object?

No comments:

Post a Comment