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 0 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 ?    0 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 0 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 ?    0 Yes 0 No
Chandrarekha
 
  Re: what is a thread?
Answer
# 5
thread is a light wieght processor.
 
Is This Answer Correct ?    0 Yes 0 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 ?    0 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 ?    2 Yes 0 No
Ravikiran
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Explain the concept of polymorphism with examples?  3
How do you set security in applets? Wipro1
Difference between the paint() and repaint() methods?  1
real time example for deadlock,starvation,livelock  3
What is the immediate superclass of Menu?  1
What is method Overriding in the perspective of OOPS?  1
what is use of business objects? Tech-Mahindra1
What is the immediate parent class of the Applet class?  1
which method is used to know the status of the Thread? Honeywell2
What is the use of anonymous inner classes ? HCL7
why there are multiple catches for a try block.don't tell me that there can be multiple exception of a code segment that's why.tell me the real fact behind this.  2
What is a method ?  2
can u override the start() method of Thread class  4
how you will prevent inheritance is there any other way other than inheritance? Wipro3
What is Runtime class and its purpose?  1
What is the difference between java and .Net? Bosch1
what is ejb? what is the importance of ejb? Photon1
If all the methods in abstract class are declared as abstract then what is difference between abstract class and in interface? Synechron4
Is it possible to write static method in abstract class? justyfy your answer? Hexaware3
Is it possible to create Userdefined Unchecked Exception also?If Yes, give an example?  2
 
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