how many ways to create Thread and which one is good?
runnable interface ot Thread class?
Answer Posted / srinu
Two ways of creating Thread
1)By extending java.lang.Thread class
2)By implementing java.lang.Runnable interface
Here 2"nd way is good because by using interface we can
implement multiple inheritance in our class
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
Why we use multi threading instead of multiprocessing?
What are predicates in java 8?
What is object in java?
What is use of map in java?
when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???
Differentiate between class and structure.
What is a method type?
In which language java is written?
How do you sort objects in java?
Is string a data type in java?
What are the different ways of creating thread?
What are different types of classloaders?
How can you say java is object oriented?
What is null data type?
Difference between a class and an object?