What happens after launching the code?
public class Main {
public static void main(String[] args) throws Exception {
Thread thread = new Thread(() -> {
String str = null;
System.out.println("Length is " + str.length());
}, "secondary");
thread.start();
while (true) {
// do nothing
}
}
}