Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to create thread in java?

Answers were Sorted based on User's Feedback



how to create thread in java?..

Answer / mohan

by extending thread class or by implementing runnable
interface

Is This Answer Correct ?    15 Yes 0 No

how to create thread in java?..

Answer / guest

There are two methods available
1.by using extends keyword
2.by using interfaces

Is This Answer Correct ?    16 Yes 3 No

how to create thread in java?..

Answer / bijoy

Their are specifically two different approaches to create
threads in Java:
1.By Extending thread class.
2.By Implementing runnable interface.

Is This Answer Correct ?    13 Yes 0 No

how to create thread in java?..

Answer / vamsikrishna

we can do it in two ways.
one is by extending thread class and other is by
implementing Runnable interface.
here the later one is good because when we are going for
mutiple inheritance only interface helps us

Is This Answer Correct ?    8 Yes 0 No

how to create thread in java?..

Answer / rahul madanan

There are two methods to create thread in java :
(1). By extending the Thread class.
(2). By implementing the Runnable interface.

Is This Answer Correct ?    6 Yes 1 No

how to create thread in java?..

Answer / bijoy kumar baral

There is two ways for creating Thread in Java:
1.Extending Thread class

2.Implementing Runnable Interface

Second one is much more benificial than 1st one,as we can
able to avoid the overriden methods.

Is This Answer Correct ?    5 Yes 1 No

how to create thread in java?..

Answer / 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

how to create thread in java?..

Answer / poorna chandar rao

thread is created in two ways
one is extends Thread class
and another way is implements runnable interface

in thees two ways implements runnable interface is better
option because it supports multilevle thread cocept

Is This Answer Correct ?    2 Yes 0 No

how to create thread in java?..

Answer / gurpreet singh

there are two ways to creat the thread:
1. by implement Runnable interface
2. by extends Thread
NOW which one is batter apprach
implement Runnable Thread is batter apporach
because in inheritance does not allow its
class to extends more than one...
Where we use mutiple inheritance then we creat
a Thread by using implement runnable interface
that why its batter apporach
ok concept is understood.
Gurpreet singh

Is This Answer Correct ?    2 Yes 0 No

how to create thread in java?..

Answer / mask

Thread can be created by tow way
1.interface
2.runnable interface

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More OOPS Interview Questions

Write a program to multiply 3x3 matrics

1 Answers  


Why it is called runtime polymorphism?

0 Answers  


What does the keyword "static" mean?

4 Answers   TCS,


what is virtual function in c++

6 Answers  


//what is wrong with the programme?? #include<iostream.h> template <class first> class dd { first i; public: void set(); void print(); }; void dd< first>:: set() { cin>>i; } void dd< first>::print() { cout<<"\n"<<i; } void main() { dd <char>g; g.set(); g.print(); }

1 Answers  


What exactly is polymorphism?

0 Answers  


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

0 Answers  


design class for linked list and include constructor,destructor,insert option. node of form struct node { int data; struct node &ptr; }

0 Answers  


tel me oops defination in single line

2 Answers  


what are the disadvantages of C++?

25 Answers   ATS, Infosys, UNI, Wipro,


how to find no of instances of an object in .NET?

1 Answers   Infosys,


What is the difference between pass by value,pass by pointer,pass by reference in the catch block in the exception handling in c++

1 Answers   TCS,


Categories