Runnable is a_______

Options
- class
- Method
- Variable
- Interface


CORRECT ANSWER : Interface

Discussion Board
request

these question's are very helpfull for fresher or me.
if possible " plz send multiple choice
question in c++ ,java and c in my
email id with answer"
rohitadhikari017@gmail.com"


Rohit Adhikari 10-2-2015 03:44 AM

No correction

ANS is correct only.
Runnable represent a task in Java which is executed by Thread. java.lang.Runnable is an interface and defines only one method called run(). When a Thread is started in Java by using Thread.start() method it calls run() method of Runnable task which was passed to Thread during creation. Code written inside run() method is executed by this newly created thread. Since start() method internally calls run() method its been a doubt among Java programmers that why not directly call the run() method.

Aswini 02-19-2015 01:41 AM

correction

my dear genius administrator,Runnable is a class not interface because Exception is the object of Runnable,if it is interface how you can create Object for interface.If you have more information visit sun tutorial api documentation.

virendra 10-14-2014 11:29 AM

Write your comments


Enter the code shown above:

(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement