java - this.getClass().getFields().length; always returns 0 -


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

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -