Exception in thread

Report a typo

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
        }
    }
}
Select one option from the list
___

Create a free account to access the full topic