ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what is a thread?
 Question Submitted By :: Sai
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is a thread?
Answer
# 1
In java environment we have to introduce the multipart
program that executes simultaniously depending on the
priority called threads
 
Is This Answer Correct ?    0 Yes 1 No
Shiva
 
  Re: what is a thread?
Answer
# 2
Thread is block of code which can execute concurrently with 
other threads in JVM(Java Virtual Machine)
 
Is This Answer Correct ?    2 Yes 0 No
Kavitha
 
 
 
  Re: what is a thread?
Answer
# 3
thread is a concept of java which help is help to tie the 
process one between another, also it give a new one called 
multiple process run in same time called multi threading....
 
Is This Answer Correct ?    0 Yes 1 No
Meganathanm
[College]
 
  Re: what is a thread?
Answer
# 4
Thread is a path of execution of a program and java 
supports multi-thread programming
 
Is This Answer Correct ?    1 Yes 0 No
Chandrarekha
 
  Re: what is a thread?
Answer
# 5
thread is a light wieght processor.
 
Is This Answer Correct ?    0 Yes 3 No
Kala
 
  Re: what is a thread?
Answer
# 6
Thread is a class which extends Thread class or Implements 
Runnable Interface.
Thread can run as an Independant process than current 
Excecution steps. The Main thread that runs always is known 
as CurrentThread accessed by Thread.currentThread();
Only one thread can access CPU time ( JVM then CPU). Multi 
thread mechanisum is possible by making several threads in 
waiting state and running only one at a time.

JVM assign priorities for every threads and accesses in a 
Time Slicing / scheduled way considering the OS.

Defauls is normal.

Every object is like a Football to threads. hence Every 
object must have methods to handle a thread. All the 
players may be running in the field but only one player can 
handle the Ball at a time. Object have methods like wait(), 
notify() notifyAll() etc to catch and release the working 
thread.

If you do not want a ball to change shape once it is 
accessed by a thread then you need to synchronise the 
statements or methods. Once synchronized the thread which 
is the owner of the Object can only change the state of the 
object.
//Method
public void synchronized x(){
 }

//statement 
synchronized (x);
 
Is This Answer Correct ?    1 Yes 0 No
Venod.r.g
 
  Re: what is a thread?
Answer
# 7
Thread is a process of execution of work.
 In a java application ,the thread starts when the 
main() starts executing till the whole Application is 
executed.
 Java supports multi threading,Multi threading is a concept 
where more than one thread can be used in a program while 
executing the applicaton.
 
Is This Answer Correct ?    0 Yes 0 No
Deepa
 
  Re: what is a thread?
Answer
# 8
thread is a sequential execution flow of control
 
Is This Answer Correct ?    3 Yes 0 No
Ravikiran
 
  Re: what is a thread?
Answer
# 9
Thread is a part of a program that is in Execution.
It is a Light weight process.
 
Is This Answer Correct ?    0 Yes 0 No
Vikas
 
  Re: what is a thread?
Answer
# 10
Thread is a unit of program code in execution. It is unit of
dispatching.
Thread can be viewed as an independent program counter
within a process.
Basically it reduces switching overhead and helps
multiprogramming.
 
Is This Answer Correct ?    0 Yes 0 No
Sharvari
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
how can you retrive information from database by using hashmap/arraylist ,plz explain with example briefly? Satyam1
What are the operands of instanceof operator?  2
What method is used to know the status of Checkbox(i.e it is checked or unchecked)?  1
Instead of writing Home, Remote Interfaces if i directly extends EJBObject to bean class what happens? Flextronics1
What is the argument type of main() method?  2
What classes of exceptions, caught by a catch clause?  1
what is webservices? CTS1
what is multitherading Tech-Mahindra2
What is constructor and virtual function?  4
In the HashMap, we know the values but we dont know the key, then how can we get the key from HashMap ????? Kanbay3
What is run-time class and system class? what is their purpose?  1
Can u overload main()method.Give with example. IBM2
Hi friends, i am new to java. can you explain how java is secured.  1
what is the difference between static block and static method Huawei10
Is there is any error if you have multiple main methods in the same class? Wipro9
Which containers use a FlowLayout as their default layout?  3
question on Thread synchronization Huawei1
explain the clone method and clonable interface  1
What is compile time polymorphism? Elementus-Technologies6
suppose string s1="rajnish"; string s2="bhaskar"; then what will be happend ? Fidelity6
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com