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 |
When abstract methods are used?
Accenture NJ mostly ask question on Collection like 1)How to sort Objcts and how treeset sort them 2)Explain mechanism of Hashcode finding in Java 3)Name some of the Sorted collection.
How much is a java license?
What is join () in java?
How do you implement singleton class?
Is space a character in java?
In collection sorting comparable and comparator interface will be used..but why this two interfaces required..two will work same purpose so why there are two interfaces instead of one?when to use comparator and when to use comparable?
explain the clone method and clonable interface
What is difference between compatible and incompatible changes in serialization?
What is persistence ?
What is a method header?
What are event-delegation model and event-inheritance model? Which is best?