Logo F2FInterview

Threads Interview Questions

Q   |   QA

A thread is a single sequential flow of control within a program. 

  1. Extend the Thread class and override the run() method.
  2. Implement the Runnable interface and implement the run() method.  

  1. Process-based.
  2. Thread-based.  

I will make ABC implement the Runnable interface to create a new thread, because ABC class will not be able to extend both XYZ class and Thread class. 

java.lang package 

In order to link this F2FInterview's page as Reference on your website or Blog, click on below text area and pres (CTRL-C) to copy the code in clipboard or right click then copy the following lines after that paste into your website or Blog.

Get Reference Link To This Page: (copy below code by (CTRL-C) and paste into your website or Blog)
HTML Rendering of above code: