A thread in NEW state

Report a typo

Create and return a thread in the NEW state.

Write a program in Java 17
class ThreadUtil {
static Thread createThreadInNewState() {
//implement the method
}
}

class Main {
public static void main(String[] args) {
Thread thread = ThreadUtil.createThreadInNewState();
System.out.println(thread.getState());
}
}
___

Create a free account to access the full topic