Created
February 10, 2020 03:51
-
-
Save HashRaygoza/87b5a6e8de17dc6fc9a4f2489a03a358 to your computer and use it in GitHub Desktop.
Llamando un metodo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void callMethod(Object objeto, String nombreMetodo) throws NoSuchMethodException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { | |
| Method metodo = objeto.getClass().getMethod(nombreMetodo); | |
| metodo.invoke(objeto); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment