This commit is contained in:
Simoes Lukas
2025-11-06 15:20:51 +01:00
parent 9b1257f3da
commit c730f07c1b
13 changed files with 874 additions and 8 deletions

View File

@@ -0,0 +1,16 @@
import java.util.Map;
import java.util.Map.Entry;
public class Main {
public static void main(String[] args) {
Map<Thread, StackTraceElement[]> threads = Thread.getAllStackTraces();
for (Map.Entry<Thread, StackTraceElement[]> thread : threads.entrySet()) {
System.out.println(thread.getKey().getName() + " :");
for (StackTraceElement trace : thread.getValue()) {
System.out.println(" " + trace.getClassName() + "." + trace.getMethodName() + "(" + trace.getFileName() + ":" + trace.getLineNumber() + ")");
}
System.out.println();
}
}
}