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 multithreading?
 Question Submitted By :: Gopalraop
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is multithreading?
Answer
# 1
Multithreading allows two parts of the same program to run 
concurrently
 
Is This Answer Correct ?    1 Yes 1 No
Chaitanya
 
  Re: what is multithreading?
Answer
# 2
A thread executes a series of instructions. Every line of 
code that is executed is done so by a thread. Some threads 
can run for the entire life of the applet, while others are 
alive for only a few milliseconds. 

Multithreading is the ability to have various parts of 
program perform program steps seemingly at the same time. 
Java let programs interleave multiple program steps through 
the use of threads. For example,one thread controls an 
animation, while another does a computation. In Java, 
multithreading is not only powerful, it is also easy to 
implement. 

You can implement threads within a java program in two 
ways – Creating an object that extends Class Thread or 
implementing the interface Runnable.

The key difference between the two is that Thread class has 
a strart() method which your program simple calls whereas 
the Runnable class does not have a start method and you 
must create a Thread object and pass your thread to its 
constructor method. You never call run() method directly; 
the start method calls it for you.

Example:

Class MyProcess extends Thread{
	Public void run(){
}
	public static void main(String args[]){
		MyProcess mp = new MyProcess();
		mp.start();
}
}
Class MyProcess implements Runnable {
Public void run(){
}
public static void main(String args[]){
		Thread mp = new Thread(new MyProcess());
		mp.start();
}
}
 
Is This Answer Correct ?    0 Yes 1 No
Shankar Reddy
 
 
 
  Re: what is multithreading?
Answer
# 3
at first ,let us know what is thread . Thread is also a functionality which executes concurrently with other of the program ,unlike general function.
Now let us see what is multithreading , executing mutiple thread simultaneously is called as multithreading.
 
Is This Answer Correct ?    1 Yes 0 No
Priyabrata Patro
 
  Re: what is multithreading?
Answer
# 4
thread is the process of execution of program is called 
thread 



multithread means when sub programs is execute on parallel 
at same time
 
Is This Answer Correct ?    0 Yes 0 No
Srinu
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
Can an exception be rethrown? Wipro4
Can we instantiate Interfaces? Ericsson4
what is main purpose of abstract class?  2
Explain in detail about encapsulation with an example?  3
What do u mean by method and also contructer in java ?  3
what is difference between prepare stetement and callable starement with example? CMC1
Can multiple catch statements be used in exceptions ? Wipro4
What is meant by throwing an Exception? Accenture4
what is the Arraylist limit (maximum) by default ? Fidelity6
how many ways to create Thread and which one is good? runnable interface ot Thread class? Satyam3
in a constructor what happen if u call super and this in the same class? i know that it is not possible to call both in the same one? if we call what will happen? ITC-Infotech6
what is bytecode? watz the difference between machine code and bytecode? Oracle4
When finalize method is called?  3
what is the use of datasource in core java? Satyam2
how to print output with out using sop statements UHG3
What is file class and what is its purpose?  1
C and C++ has constructors and distructors, why does Java does not have distructors? T3-Softwares1
What services that container provides?  1
IS method overriding is Duplication of Methods? CybAge4
what is custom tags with example? AMDOC1
 
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