Java Programming Questions and Answers
Which of these class is used to make a thread?
Which of these interface is implemented by Thread class?
Which function of pre defined class Thread is used to check weather current thread being checked is still running?
What is the output of this program?
classmultithreaded_programing{
publicstaticvoidmain(String args[]){
Thread t = Thread.currentThread();
t.setName("New Thread");
System.out.println(t);
}
}
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?