Java Programming Questions and Answers
What is the priority of the thread in output of this program?
classmultithreaded_programing{
publicstaticvoidmain(String args[]){
Thread t = Thread.currentThread();
t.setName("New Thread");
System.out.println(t.getName());
}
}
What is the name of the thread in output of this program?
classmultithreaded_programing{
publicstaticvoidmain(String args[]){
Thread t = Thread.currentThread();
System.out.println(t.getPriority());
}
}
Which methods are utilized to control the access to an object in multi threaded programming
Which of the following is used to force each thread to reconcile its working copy of a variable with the master copy in main memory?
What is multithreaded programming?
Thread priority in Java is?
What will happen if two thread of same priority are called to be processed simultaneously?
What is the priority of the thread in output of this program?
classmultithreaded_programing{
publicstaticvoidmain(String args[]){
Thread t = Thread.currentThread();
System.out.println(t);
}
}
What is the name of the thread in output of this program?
classmultithreaded_programing{
publicstaticvoidmain(String args[]){
Thread t = Thread.currentThread();
System.out.println(t);
}
}
What is the name of the method used to start a thread execution?