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

What is thread?

Answer Posted / javamasque

Threads are lightweight process which lives inside process. These are independently running programs which have concurrent path of execution. Each thread has its own 1. Java stack 2. Program counter and 3. Native stack but have common heap space. Multiple threads with in same process share same variables and objects. They allocates objects from same heap and even they can share same instructions (execution code) at particular time. As a result above common access they can easily share information to each other.

Every program has at least one thread i.e. main thread. JVM creates main thread which calls main method to execute whole program. The main thread is non-daemon thread. Any thread created by main method is non-daemon thread by default.

JVM has daemon threads for garbage collection, object finalization and other housekeeping jobs.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What do you understand by soft reference?

982


What do you mean by checked exceptions?

898


What is the difference between logical data independence and physical data independence?

979


What is the difference between exception and error in java?

959


How do generics work in java?

947


What is the difference between JDBC 1.0 and JDBC 2.0?

3123


what is daemon thread and which method is used to create the daemon thread? : Java thread

905


What is a values collection view ?

1030


If a class is declared without any access modifiers, where may the class be accessed in java programming?

1135


What are internal and external variables?

905


Can we write method inside a method in java?

931


What are the 4 types of research methods?

873


What should I import for arraylist in java?

969


What is meant by call by reference?

946


Why hashmap is used in java?

1014