how to create thread in java?

Answer Posted / vijay tandel

Thread can be created by

1. Extending Thread Class
2. implementing Runnable interface

The second approach is better as if you want to use multiple
inheritance, interface is better option.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a C++ program for booking using constructor and destructor.

2278


What is basic concept of oop?

909


what type of question are asked in thoughtworks pair programming round ?

1975


Which is not an object oriented programming language?

749


What is inheritance in simple words?

826


What is use of overloading?

866


Why is oop useful?

822


What are the important components of cohesion?

757


What is oops in simple words?

818


Which language is not a true object oriented programming language?

884


What is polymorphism give a real life example?

773


What is overriding vs overloading?

800


What is object and class in oops?

795


What is coupling in oops?

831


Where is pseudocode used?

758