Wszystko jusz wyprobulalem...
package pl.codegym.task.task16.task1604;
/*
Wyświetlanie śladu stosu
*/
public class Solution {
public static void main(String[] args) throws InterruptedException {
Thread thread = new Thread(new SpecialThread());
thread.start();
Thread thread1 = new Thread(new SpecialThread());
thread1.start();
System.out.println("slad");
System.out.println("*****************");
for (StackTraceElement element : Thread.currentThread().getStackTrace()) {
System.out.println(element);
}
}
public static class SpecialThread implements Runnable{
@Override
public void run() {
}
}
}