MCQOPTIONS
Bookmark
Saved Bookmarks
→
Java Programming
→
Exceptions
→
What is the priority of the thread in output of th..
1.
What is the priority of the thread in output of this program?
A.
0
B.
1
C.
2
D.
4
E.
5
Answer» F.
Show Answer
Discussion
No Comment Found
Post Comment
Related MCQs
What is the output of this program?<br><pre class="prettyprint lang-c">class newthread implements Runnable <br> {<br> Thread thread;<br> newthread() <br> {<br> thread = new Thread(this,"New Thread created...");<br> thread.start();<br> }<br> public void run() <br> {<br> System.out.println(thread);<br> }<br> }<br> public class multithreaded_Example <br> {<br> public static void main(String args[]) <br> {<br> new newthread(); <br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">class newthread implements Runnable <br> {<br> Thread thread;<br> newthread() <br> {<br> thread = new Thread(this,"My Thread created...");<br> thread.start();<br> }<br> public void run() <br> {<br> System.out.println(thread.getName());<br> }<br> }<br> public class multithreaded_Example <br> {<br> public static void main(String args[]) <br> {<br> new newthread(); <br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">class newthread implements Runnable <br> {<br> Thread thread;<br> newthread() <br> {<br> thread = new Thread(this,"My Thread");<br> thread.start();<br> }<br> }<br> public class multithreaded_Example <br> {<br> public static void main(String args[]) <br> {<br> new newthread(); <br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">class Mythread extends Thread <br> {<br> Mythread()<br> {<br> super("New Thread...");<br> start();<br> }<br> public void run()<br> {<br> System.out.println(this);<br> }<br> }<br> <br> public class multithreaded_programing<br> {<br> public static void main(String args[])<br> {<br> new Mythread(); <br> }<br> }<br></pre>
What is the output of the thread in output of this program?<br><pre class="prettyprint lang-c">public class Output<br> {<br> public static void main(String args[])<br> {<br> Thread thread = Thread.currentThread();<br> System.out.println(thread.isAlive()); <br> }<br> }<br></pre>
What is the name of the thread in output of this program?<br><pre class="prettyprint lang-c">public class multithreading_NameExample<br> {<br> public static void main(String args[])<br> {<br> Thread thread = Thread.currentThread();<br> thread.setName("Thread One");<br> System.out.println(thread.getName()); <br> }<br> }<br></pre>
What is the priority of the thread in output of this program?<br><pre class="prettyprint lang-c">public class multithreaded_PriorityExample<br> {<br> public static void main(String args[])<br> {<br> Thread thread = Thread.currentThread();<br> thread.setName("Thread One");<br> System.out.println(thread.getPriority()); <br> }<br> }<br></pre>
What is the output of this program?<br><pre class="prettyprint lang-c">public class multithreading_Example<br> {<br> public static void main(String args[])<br> {<br> Thread thread = Thread.currentThread();<br> thread.setName("Thread one");<br> System.out.println(thread); <br> }<br> }<br></pre>
What is the name of the thread in output of this program?<br><pre class="prettyprint lang-c">public class multithreaded_Name<br> {<br> public static void main(String args[])<br> {<br> Thread thread = Thread.currentThread();<br> thread.setName("First");<br> System.out.println(thread); <br> }<br> }<br></pre>
What is the priority of the thread in output of this program?<br><pre class="prettyprint lang-c">public class multithreading_Priority <br> {<br> public static void main(String args[])<br> {<br> Thread thread = Thread.currentThread();<br> System.out.println(thread); <br> }<br> }<br></pre>
Reply to Comment
×
Name
*
Email
*
Comment
*
Submit Reply