Home » Java Programming » Threads

What will be the output of the program? public class ThreadTest extends Thread { public void run() { System.out.println("In run"); yield(); System.out.println("Leaving run"); } public static void main(String []argv) { (new ThreadTest()).start(); } }

Correct Answer: The text "In run" followed by "Leaving run" will be displayed

← Previous Question Next Question→

More Questions from Threads

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion