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...


can u override the start() method of Thread class

Answers were Sorted based on User's Feedback



can u override the start() method of Thread class..

Answer / gcd

Yes you can override the start method of the thread class.

if you extend from the thread class. and override.
then only start method will be called

Is This Answer Correct ?    14 Yes 3 No

can u override the start() method of Thread class..

Answer / vishwanath

We can override start() method but it is not recommended.
Why because...the start() method of Thread class first
registers a new thread with the Thread Scheduler and it
invokes run() method.

Is This Answer Correct ?    4 Yes 0 No

can u override the start() method of Thread class..

Answer / sandya

Subhareddy, can u please send me one example on above
question??

Is This Answer Correct ?    3 Yes 0 No

can u override the start() method of Thread class..

Answer / raju singh

class Car extends Thread
{
@override
public void run()
{
super.start();
System.out.println("This is start in car class");
}
@override
public void run()
{
System.out.println("Car is running");
}
}
class Application
{
public static void main(String []args)
{
Car c=new Car();
c.start();
}
}

Is This Answer Correct ?    1 Yes 0 No

can u override the start() method of Thread class..

Answer / subhareddy

we can override start() method present in Thread class.but
we have to follow following steps:

1) first our class must extend thread class.
2)then we have to override thread class start() in such way
that :
a) It should instantiate and register our new thread with
thread scheduler.
b) it should call run() method.(it may be our overridden
run method or thread class run() method)

Is This Answer Correct ?    5 Yes 7 No

Post New Answer

More Core Java Interview Questions

What does the “static” keyword mean?

0 Answers  


Explain the importance of finally block in java?

0 Answers  


What are the different data types in java?

0 Answers  


What is classpath?

0 Answers  


What are the notations in Java?

1 Answers   Cap Gemini,


Differentiate between vector and array list.

0 Answers  


What is the size of arraylist in java?

0 Answers  


What is threaded programming and when is it used? : Java thread

0 Answers  


Which is better 64 bit or 32 bit?

0 Answers  


Why there are some null interface in java? What does it mean?

0 Answers  


What is object cloning in Java?

0 Answers   SwanSoft Technologies,


How will you add panel to a frame?

0 Answers  


Categories