Create and return a thread in the NEW state.
States of a thread
A thread in NEW state
Report a typo
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());
}
}
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.