How to create second stack memory
package org.example;
public class Main {
public static void main(String[] args) {
System.out.println("main started");
Runnable runnable = () -> test1();
Thread thread = new Thread(runnable);
thread.start();
System.out.println("main ended");
}
public static void test1() {
throw new RuntimeException("Something went wrong");
}
}
Комментарии
Отправить комментарий