Object obj = new Object();
try {
obj.getClass().getConstructor();
} catch (SecurityException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
dosomething();
e.printStackTrace();
}
I don't want check like this, because it throw a Exception.
Is there another way?
Aucun commentaire:
Enregistrer un commentaire