Skip to main content
The 2024 Developer Survey results are live! See the results
2 events
when toggle format what by license comment
Feb 9, 2023 at 8:13 comment added Holger Instead of comparing field[j].getGenericType().toString() with "class java.lang.String", you can use a straight-forward check of the actual type, i.e. if(field[j].getType() == String.class) That’s simpler and way more efficient.
Sep 11, 2012 at 3:20 history answered rookiepupil CC BY-SA 3.0