simple java question about setPriority
so why tf does this not work.. "Welcome!" is always supposed to be printed first, then "Please enter your name" (this program does not suppose to take an input btw.. just prints those two things out) class Main { public static void main(String[] args) { Name name = new Name(); //set priority to low name.setPriority(1); Welcome welcome = new Welcome(); //set priority to high welcome.setPriority(2); name.start(); welcome.start(); } } //extend the Thread class class Welcome extends Thread { @Override public void run() { setPriority(2); // still doesn't work System.out.println("Welcome!"); } } //extend the Thread class class Name extends Thread { @Override public void run() { setPriority(1); // also doesn't do anything.. System.out.println("Please enter your name"); } } then when I use Thread.currentThread().getPriority() on each run method, it shows their respective priority, so I don't get it.. for reference, this is java course practice lesson 59.2