Java Thread dumpStack() methodThe dumpStack() method of thread class prints a stack trace of the current thread to the standard error stream. It is used only for debugging. SyntaxReturnThis method does not return any value. ExampleTest it NowOutput: Current thread: Thread[My ThreadDumpStack,6,main] currently active threads: 1 java.lang.Exception: Stack trace at java.lang.Thread.dumpStack(Thread.java:1336) at javatpoint.java.JavaDumpStackExp.main(JavaDumpStackExp.java:19) Next TopicMultithreading Java |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India