Quiz - Threads
Hello! I'm trying to understand why the following solution does not work for the Java threads quiz. "Welcome" should output to the console before "Please enter your name." Any idea what is happening? class Main { public static void main(String[ ] args) { Name name = new Name(); //set priority Welcome welcome = new Welcome(); //set priority name.setPriority(1); welcome.setPriority(5); name.start(); welcome.start(); } } //extend the Thread class class Welcome extends Thread { public void run() { System.out.println("Welcome!"); } } //extend the Thread class class Name extends Thread { public void run() { System.out.println("Please enter your name"); } }