5 years ago in Java Multithreading

What is the name of the thread in output of this program?

class multithreaded_programing {
public static void main(String args[]) {
Thread t = Thread.currentThread();
System.out.println(t.getPriority());
}
}

[A] 0
[B] 1
[C] 4
[D] 5
Loading...
Next Question

Overall Stats

Attempted 242
Correct 89
Incorrect 59
Viewed 94

Answers

Guest
Guest
Sagar Gawari
Sagar Gawari - 3 weeks ago

Sagar Gawari from Pune, India is saying 5 is correct answer

Keerthana Keerthi
Keerthana Keerthi - 1 month ago

Keerthana Keerthi is saying 4 is correct answer

Poorna Hari priya Muttamsetty
Poorna Hari priya Muttamsetty - 2 months ago

Poorna Hari priya Muttamsetty from Vijayawada, India is saying 5 is correct answer

Narmada Devi
Narmada Devi - 3 months ago

Narmada Devi from Coimbatore, India is saying 1 is correct answer

rayapudi saiteja
rayapudi saiteja - 3 months ago

rayapudi saiteja from Visakhapatnam, India is saying 5 is correct answer

Related Questions

Which of these interface is implemented by Thread class?

  • [A] Runnable
  • [B] Connections
  • [C] Set
  • [D] MapConnections

Which of these statements is incorrect?

  • [A] By multithreading CPU's idle time is minimized, and we can take maximum use of it.
  • [B] By multitasking CPU's idle time is minimized, and we can take maximum use of it.
  • [C] Two thread in Java can have same priority
  • [D] A thread can exist only in two states, running and blocked.

What will happen if two thread of same priority are called to be processed simultaneously?

  • [A] Any one will be executed first lexographically
  • [B] Both of them will be executed simultaneously
  • [C] None of them will be executed
  • [D] It is dependent on the operating system.

Which methods are utilized to control the access to an object in multi threaded programming

  • [A] Asynchronized methods
  • [B] Synchronized methods
  • [C] Serialized methods
  • [D] None of above