Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training

Java Multithreading

Multithreading allows two parts of the same program to run concurrently. In Java, the Java Virtual Machine (JVM) allows an application to have multiple threads of execution running concurrently independently.

Ads

Java Multithreading

     

Multithreading allows two parts of the same program to run concurrently. In Java, the Java Virtual Machine (JVM) allows an application to have multiple threads of execution running concurrently independently. When a program contains multiple threads then the CPU can switch between the two threads to execute them at the same time.  In case of Multithreading, if more than one thread manipulates shared variables or objects at the same time, corruption may result. Instance variables are shared between threads. If one is modified by a thread, the change affects the other threads.
 
Java enables you to synchronize threads by defining a synchronized method. A thread that is inside a synchronized method prevents any other thread from calling another synchronized method on the same object.

Read more at:

http:/www.roseindia.net/java/thread/SynchronizedThreads.shtml

 

Advertisements

Ads

Online Training Classes

Share on Google+Share on Google+

Java Multithreading

Posted on: December 15, 2008 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Java Multithreading   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads