This commit is contained in:
2024-11-27 11:35:15 +01:00
parent 467af38a01
commit d39124f928
21 changed files with 902 additions and 56 deletions

Binary file not shown.

View File

@@ -2,11 +2,21 @@ import java.util.*;
public class Main {
public static void main (String[] args){
Map<Thread,StackTraceElement[]> dico =Thread.getAllStackTraces();
Set<Map.Entry<Thread,StackTraceElement[]>> tab=dico.entrySet();
Iterator ite=tab.iterator();
for (;ite.hasNext();){
System.out.println(ite.next()+"\n");
Map<Thread, StackTraceElement[]> dico = Thread.getAllStackTraces();
Set<Map.Entry<Thread, StackTraceElement[]>> tab = dico.entrySet();
Iterator<Map.Entry<Thread, StackTraceElement[]>> ite = tab.iterator();
for (; ite.hasNext(); ) {
Map.Entry<Thread, StackTraceElement[]> entry = ite.next();
Thread thread = entry.getKey();
StackTraceElement[] stackTrace = entry.getValue();
System.out.println(thread.getName() + " :");
for (StackTraceElement element : stackTrace) {
System.out.println(" " + element);
}
System.out.println();
}
}
}
}