Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Synchronization on threads
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


karthik
Synchronization on threads
1 Answer(s)      3 years and 11 months ago
Posted in : Java Beginners


what is the difference between synchronized method and block??


Advertisement
View Answers

October 23, 2010 at 10:54 AM


Hello Friend,

Differences:

1)Synchronized blocks place locks for shorter periods than synchronized methods.

2)Synchronized method allows only one user to use it at any given time and the request will be queued and are executed while Statements in the synchronized block are executed sequentially.

Thanks



Related Tutorials/Questions & Answers:
Synchronization on threads
Synchronization on threads  what is the difference between synchronized method and block??   Hello Friend, Differences: 1)Synchronized blocks place locks for shorter periods than synchronized methods. 2)Synchronized
Synchronization
Synchronization  what is the use of synchronization
Advertisements
synchronization
synchronization  what is about static method synchronization&instance method synchronization
Synchronization
Synchronization  i want code for synchronization using in jsp and servlets
threads
threads  what are threads? what is the use in progarmming
Java Synchronization
Java Synchronization  What is synchronization and why is it important?  Synchronization is best use with the Multi-Threading in Java. Synchronization is the way to make our program safe. As we know when we have two
Java synchronization
Java synchronization  What is synchronization and why is it important?  Synchronization is best use with the Multi-Threading in Java. Synchronization is the way to make our program safe. As we know when we have two
Synchronization
Synchronization       Threads commonly share the same memory space area, that?s why they can share the resources. Threads commonly communicate by sharing access to fields
Synchronization and interlocking
Synchronization and interlocking  What are the different level locking using the synchronization keyword
java synchronization
java synchronization   What is synchronization and why is it important
Synchronization with Multithreading - Java Beginners
, Synchronization : Two or more threads share the same resource (variable or method...Synchronization with Multithreading   Hi Deepak, what i know abt synchronization is , we can implement synchronized keyword
Synchronization in cluster - Development process
Synchronization in cluster  I have a scenario to implement. we have....  Hi, Synchronization is a process of controlling the access of shared resources by the multiple threads in such a manner that only one thread can
Synchronization and Singlethreadmodel - Java Beginners
Synchronization and Singlethreadmodel   Hi Deepak, wat is d difference between singleThreadmodel and synchronization. Thank u in advance
Describe synchronization in respect to multithreading.
Describe synchronization in respect to multithreading.  Hi, Describe synchronization in respect to multithreading. thanks,   Are you... the synchronization in respect to multithreading
Synchronization - Java Interview Questions
Synchronization  Dear Sir my doubt is If we cannot use synchronization for a class then how a vector class is called as synchronized
Thread Synchronization in Java
Thread Synchronization in Java Sometimes, when two or more threads need shared... as thread synchronization. The thread synchronization is achieved through... to be synchronized } Object in Java which have synchronization block
difference between lock and synchronization
difference between lock and synchronization  Hi, I am new in java please anyone tell me difference between lock and synchronization in java. its... and Synchronization
threads and events
threads and events  Can you explain threads and events in java for me. Thank you.   Java Event Handling Java Thread Examples
threads in java
threads in java  how to read a file in java , split it and write into two different files using threads such that thread is running twice
Java :Thread Synchronization
Java :Thread Synchronization This section explains how to use concept of synchronization in java Thread. Thread Synchronization : . Java supports multi-threading concept that is multiple threads run parallel to complete the execution
Java threads
Java threads  What are the two basic ways in which classes that can be run as threads may be defined
disadvantage of threads
is the disadvantage of threads?   hello, The Main disadvantage of in threads... disadvantage of Threads. Let?s discuss the disadvantages of threads. The global..., the other threads using the same memory location will be killed automatically
Synchronized Threads
Synchronized Threads       In Java, the threads are executed independently to each other. These types of threads are called as asynchronous threads. But there are two problems may
Sync Threads
Sync Threads  "If two threads wants to execute a synchronized method in a class, and both threads are using the same instance of the class to invoke the method then only one thread can execute the method at a time." This is what
threads in java
threads in java  iam getting that the local variable is never read in eclipse in main classas:: class Synex4{ public static void main(String args[]){ Test1 ob1=new Test1(); //local variable never read
Advertisements
 

 

 

DMCA.com