Hi, Is it possible that i can get the stack trace printed though i do not explicitly handle any exceptions in my program.?
posted 12 years ago
Just create an exception and use its printStackTrace method, to print the stack trace at the default output. If you don't throw the Exception object, you don't need to catch or handle it. For example, at the location where you want the stack trace, just add the following code:
Exception e = new Exception("MyException"); e.printStackTrace();