
Use printStackTrace() method to generate stack
Stack trace is a kind of call stack, which maintains the call sequence of methods at any given point in time. Throwable class in Java provides a method called “printStackTrace()” which can be used to print out the entire stack trace. You can use this method during debugging complex bug