View Count: 0
Duration: 29 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 62 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 27 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Question No: 1 of 32
1. Which of these method is used to implement Runnable interface? 
Options:
  1. stop()
  2. run()
  3. runThread()
  4. stopThread()
View Answer/Explanation:
b
Explanation:

Question No: 2 of 32
2. Which of these interface is implemented by Thread class? 
Options:
  1. Runnable
  2. Connections
  3. Set
  4. MapConnections
View Answer/Explanation:
a
Explanation:

Question No: 3 of 32
3 Which of these method is used to begin the execution of a thread? 
Options:
  1. run()
  2. start()
  3. runThread()
  4. startThread()
View Answer/Explanation:
b
Explanation:

Question No: 4 of 32
4. Which of these method waits for the thread to treminate? 
Options:
  1. sleep()
  2. isAlive()
  3. join()
  4. stop()
View Answer/Explanation:
c
Explanation:

Question No: 5 of 32
5. Which of these statement is incorrect? 
Options:
  1. A thread can be formed by implementing Runnable interface only.
  2. A thread can be formed by a class that extends Thread class.
  3. start() method is used to begin
  4. run() method is used to begin execution of a thread before start() method in special cases.
View Answer/Explanation:
d
Explanation:

Question No: 6 of 32
6. What is the output of this program?
class newthread implements Runnable
{
Thread t;
newthread() 
{
t = new Thread(this,"My Thread");
t.start();
}
public void run()
{
System.out.println(t.getName());
}
}
class multithreaded_programing 
{
public static void main(String args[])
{
new newthread();        
}
} 
Options:
  1. My Thread
  2. Thread[My Thread,5,main]
  3. Compilation Error
  4. Runtime Error
View Answer/Explanation:
a
Explanation:

Question No: 7 of 32
7. What is the output of this program?
class newthread implements Runnable
{
Thread t;
newthread() 
{
t = new Thread(this,"My Thread");
t.start();
}
public void run() 
{
System.out.println(t);
}
}
class multithreaded_programing 
{
public static void main(String args[])
{
new newthread();        
}
} 
Options:
  1. My Thread
  2. Thread[My Thread,5,main]
  3. Compilation Error
  4. Runtime Error
View Answer/Explanation:
b
Explanation:

Question No: 8 of 32
8. What is the output of this program?
class newthread implements Runnable 
{
Thread t;
newthread()
{
t = new Thread(this,"My Thread");
t.start();
}
}
class multithreaded_programing
{
public static void main(String args[])
{
new newthread();        
}
} 
Options:
  1. My Thread
  2. Thread[My Thread,5,main]
  3. Compilation Error
  4. Runtime Error
View Answer/Explanation:
c
Explanation:

Question No: 9 of 32
9. What is the output of this program?
class newthread implements Runnable 
{
Thread t;
newthread() 
{
t = new Thread(this,"New Thread");
t.start();
}
public void run() 
{
t.setPriority(Thread.MAX_PRIORITY);	
System.out.println(t);
}
}
class multithreaded_programing
{
public static void main(String args[])
{
new newthread();        
}
} 
Options:
  1. Thread[New Thread,0,main]
  2. Thread[New Thread,1,main]
  3. Thread[New Thread,5,main]
  4. Thread[New Thread,10,main]
View Answer/Explanation:
d
Explanation:

Question No: 10 of 32
10. What is the output of this program?
class newthread implements Runnable
{
Thread t;
newthread() 
{
t1 = new Thread(this,"Thread_1");
t2 = new Thread(this,"Thread_2");
t1.start();
t2.start();
}
public void run()
{
t2.setPriority(Thread.MAX_PRIORITY);	
System.out.print(t1.equals(t2));
}    
}
class multithreaded_programing 
{
public static void main(String args[])
 {
new newthread();        
}
} 
Options:
  1. true
  2. false
  3. truetrue
  4. falsefalse
View Answer/Explanation:
d
Explanation:

  1