Hello
in my java class Toto, I have 3 static methods
I would like to know when I’m in one of these methods , how to get and display the name of package.class.methode in the try catch bloc ?
I tried in methodeA:
public static void methodeA(){
try{
system.out.println("I do something");
}
catch(Exception e){
system.out.println("failed" +e.getClass().getMethods().toString());
}
but it is not working, how also could I show it in try ?
thanks
e.printStackTrace();– that will print the whole exception stracktrace – i.e. all the methods + line numbers.