APL/DEV 3.2/TP06/Traces/Traces.java
2022-11-17 16:20:15 +01:00

21 lines
502 B
Java

package Traces;
import java.util.Map;
/**
* Traces
*/
public class Traces {
public static void main(String[] args) {
Map<Thread, StackTraceElement[]> dict = Thread.getAllStackTraces();
for (Map.Entry<Thread, StackTraceElement[]> entry : dict.entrySet()) {
System.out.println(entry.getKey().getName());
for (StackTraceElement el : entry.getValue()) {
System.out.println("\t" + el.toString());
}
}
}
}