Vidyalelo
Java Programming · all questions

Threads
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

105

Questions

6/6

Page

Pick an option on a question to see the right answer and solution.

Which of these statements is incorrect?

Select an option to see the answer and solution.

What will be the output of the following Java code?
class multithreaded_programing
{
    public static void main(String args[])
    {
        Thread t = Thread.currentThread();
        t.setName("New Thread");
        System.out.println(t);        
    }
}

Select an option to see the answer and solution.

What will be the output of the following Java code?
class multithreaded_programing
{
    public static void main(String args[])
    {
        Thread t = Thread.currentThread();
        System.out.println(t);        
    }
}

Select an option to see the answer and solution.

What should not be done to avoid deadlock?

Select an option to see the answer and solution.

What is synchronization in reference to a thread?

Select an option to see the answer and solution.