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

In how many ways we can the thread? in java

Answer Posted / virendrasinh gohil

The only way to create a thread is using a thread class.
(Either by extending it or creating object elsewhere).
Runnable does very little contribution here. It's just
that, the thread object expects instance of a class which
should have run() (semantics) method and is called via
runnable interface. Runnable method doesn't create any
thread by itself (sounds dumb as everybody knows Runnable
is an interface).

Calling Thread's start() is the only way in java to spawn a
separate independed execution with in the application.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between array and array list in java?

1207


Why is whitespace important?

1067


How many types of flags are there?

1004


What is the covariant return type?

1069


Why is logger singleton?

1092


Explain about anonymous inner classes ?

1051


What is method in java with example?

928


we have syntax like for(int var : arrayName) this syntax is to find whether a number is in the array or not.but i want to know how to find that number's location.

2019


Why do we need hashset in java?

1024


Difference between string, stringbuffer and stringbuilder?

1010


5 Coding best practices you learned in java?

1005


Can a static class have a constructor?

993


What is the difference between object oriented programming language and object based programming language?

1000


What is a instance variable in java?

1027


What is static synchronization?

1087