What is thread?
Answers were Sorted based on User's Feedback
Answer / l.gururajan
Thread is a path of the execution in a program.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / naveen
A thread is a part of program that follows a separate path of execution.
A thread is also called a light weight process as they share common resources
| Is This Answer Correct ? | 4 Yes | 0 No |
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 |
What type of value does sizeof return?
Why is java so important?
What do you understand by synchronization?
what is custom tags with example?
How can you say HashMap is syncronized?
What is stringjoiner ?
class A{ m2(){ } } class B extends A{ m2(){ } } class c extends B{ m2(){ } } class my_class extends c{ m2(){ } pulic static void main(){ ...My_class a = new my_class(); super.super.super.m2(); is this is leagal if not find what is the legal procedure in order to call A's version of m2(); }
What do you mean by an interface in java?
Differentiate constructor and a method and how are it be used?
How do I get 64 bit java?
What is static variable with example?
How to do encapsulation in java?