java - this.getClass().getFields().length; always returns 0 -
this question has answer here:
i trying number of fields in particular class. technique using not working , returns 0:
this.getclass().getfields().length; how field count of particular class?
use this.getclass().getdeclaredfields().length getfields method accessible public fields - see documentation.
Comments
Post a Comment