java synchronization

java synchronization

What is synchronization and why is it important?
View Answers

October 23, 2010 at 12:56 PM

Hi,

Here is the answer.

Synchronization is best use with the Multi-Threading in Java, Synchronization is the capability to control the access of multiple threads to share resources. Without synchronization it is possible for one thread to modify a shared object while another thread is in the process of using or updating that object's value.This often leads to an error.

A thread is a distinct flow of program logic that can be executed at the same time as other threads. This make it seem like two things are running simultaneously (kind of like how word spell checks as you type).Occasionally you might need one thread to wait until another thread gets to the same point.

An example might be if you had a program, and a fancy user interface that required animation. You might pause the logic part of your program and wait until the animation finished before the threads continue on. This is synchronization.

Thanks.









Related Tutorials/Questions & Answers:
java synchronization
java synchronization   What is synchronization and why is it important
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
Advertisements
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  what is the use of synchronization
Synchronization and Singlethreadmodel - Java Beginners
Synchronization and Singlethreadmodel   Hi Deepak, wat is d difference between singleThreadmodel and synchronization. Thank u in advance
Synchronization with Multithreading - Java Beginners
Synchronization with Multithreading   Hi Deepak, what i know abt synchronization is , we can implement synchronized keyword..., Synchronization : Two or more threads share the same resource (variable or method
Synchronization
Synchronization  i want code for synchronization using in jsp and servlets
synchronization
synchronization  what is about static method synchronization&instance method synchronization
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
Synchronization - Java Beginners
the following links: http://www.roseindia.net/java/thread/synchronization.shtml http://www.roseindia.net/java/java-methods/java-method-synchronized.shtml http://www.roseindia.net/java/thread/SynchronizedThreads.shtml Thanks
Synchronization in java with example
Synchronization in java with example In this section we will discuss about Synchronization in java. Since java is a multi-threaded language so, when two... synchronization. Synchronized keyword in java create a critical section in which a lock
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...) { // statements to be synchronized } Object in Java which have
how the streams provide synchronization - Java Beginners
how the streams provide synchronization  How the java streams provides synchronization
Java :Thread Synchronization
Java :Thread Synchronization This section explains how to use concept of synchronization in java Thread. Thread Synchronization : . Java supports multi... of program. So for the multi-threaded application, synchronization of java
Java Thread Synchronization - Development process
Java Thread Synchronization  Hi,Please help me with this coding. I...: "); t2.start(); } } For more information on Java visit to : http://www.roseindia.net/java/ Thanks
Synchronization probleam - Java Server Faces Questions
Synchronization probleam   Hi friends My java multithreading..." to solve the probelm and visit to : http://www.roseindia.net/java/example/java/awt/ Thanks   Hi friend, I saw your sending code but i does
Synchronization and interlocking
Synchronization and interlocking  What are the different level locking using the synchronization keyword
Synchronization probleam - Java Server Faces Questions
Synchronization probleam  Hi friend my question is why it is consuming 99% of cpu time. if i discarded that vechile package it doesnt affect the programme Here is the new code please tell me how to synchronize
Synchronization
Synchronization      ... consistency errors. By the synchronization tool we can avoid this problem. In other... resource. Every object in Java has build-in lock that only comes in action when
Describe synchronization in respect to multithreading.
Describe synchronization in respect to multithreading.  Hi, Describe synchronization in respect to multithreading. thanks,   Are you eager the search related to Java programming query. Let us check
Synchronization on threads
Synchronization on threads  what is the difference between synchronized method and block??   Hello Friend, Differences:ADS_TO_REPLACE_1 1)Synchronized blocks place locks for shorter periods than synchronized methods
synchronization
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
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... is in the process of using or updating the object's value. Synchronization prevents
ModuleNotFoundError: No module named 'cyclone-synchronization-tool'
ModuleNotFoundError: No module named 'cyclone-synchronization-tool'  ...: No module named 'cyclone-synchronization-tool' How to remove the ModuleNotFoundError: No module named 'cyclone-synchronization-tool' error
ModuleNotFoundError: No module named 'cyclone-synchronization-tool'
ModuleNotFoundError: No module named 'cyclone-synchronization-tool'  ...: No module named 'cyclone-synchronization-tool' How to remove the ModuleNotFoundError: No module named 'cyclone-synchronization-tool' error
tread - Java Beginners
with the Multi-Threading in Java, Synchronization is the capability to control the access...tread  what is a thread and synchronization? give real time example?  A thread is a thread of execution in a program. The Java Virtual
JAVA - Java Beginners
JAVA  Dear Sir, Kindly guide me the definitions in short form (4 to 5 lines) for the following in JAVA, please. 1.Layout Manager 2.Dynamic Method Dispatch 3.Thread Synchronization 4.Abstract Class 5.Over riding methods
corejava - Java Beginners
at the same time . To avoid this problem java has a concept called synchronization...Deadlock Core Java  What is Deadlock in Core Java?  .../java/thread/deadlocks.shtmlThanks
use of synchronozation - Java Interview Questions
is not synchronization and not athread safe,so what are the advantages of synchronization with examples.   Hi friend, Synchronozation.... Synchronization is the keyword to avoid concurrent access to critical section of the code
Interview question - Java Interview Questions
Interview question   Hi Friends, Give me details abt synchronization in interview point of view. I mean ow to explain short and neat. Thanks
SubText Plugin
and handling, synchronization, context-sensitive behavior, performance optimizations...: subtext name PointcutExpression; Documentation name can be any valid Java identifier
Java News in July 2007
Java News in July 2007          Yahoo! to launch its intelligent client Using Java means a better user experience .Yahoo! Go is a Java application which
Multithreading ? - Java Interview Questions
Multithreading ?   Hi Friends, I am new to java... implement Synchronization keyword or singlethreadmodel interface to avoid deadlock...://www.roseindia.net/java/thread/Java-Multithreading.shtml Thanks
Java concurrency
Java concurrency utilities are classes used as building blocks in building... makes a program short, fast, easier to write, read and maintain. Java... implementations of building blocks. The new Java concurrency utilities have:ADS
JAVA - Java Beginners
to 5 lines) for the following in JAVA, please. The answer is required very much urgent since I have to attend for the exam in JAVA. It would be very helpful... Method Dispatch 3.Thread Synchronization 4.Abstract Class 5.Over riding methods
java implementation problem
java implementation problem   I want to implement following in java code : Main thread Create three threads wait for completion of stage 2 of all.... end My problems: There is no need of synchronization. hence i can't use
Java Thread : getState() Example
Java Thread : getState() Example This section explains how to get state of a thread  in java Thread. Thread  getState() : Suppose you want to know the state of the thread so for that Java Thread provides Thread.getState
Core Java Interview Question, Interview Question
Core Java Interview Question Page 12  ..._TO_REPLACE_3 Question: What is synchronization and why is it important? Answer: With respect to multithreading, synchronization is the capability to control
Threading in Java
threads are executing Thread Synchronization in Java When two... Threading in Java      ... is very important in Java Programing language. A thread is a sequential path
Core Java Interview Question, Interview Question
not access the same account simultaneously. This is done in Java using synchronization... Core Java Interview Question Page 10  ... it?  Answer: Synchronization is the act of serializing access to critical
java - Java Interview Questions
information, visit the following links: http://www.roseindia.net/help/java/f/final-keyword.shtml http://www.roseindia.net/java/javascript-array/modified-java-method-final-parameter.shtml http://www.roseindia.net/java/beginners
: Java Compilation error. - Java Beginners
: Java Compilation error.  what is the difference between static... on java visit to : http://www.roseindia.net/java/beginners/ http://www.roseindia.net/java/beginners/howtoaccessstaticmethod.shtml Thanks   static
Java Interview Questions 3
Java Interview Questions page 3   ...; What is synchronization and why is it important? Answer: With respect to multithreading, synchronization is the capability to control the access
Online Advance Java Training Course
Online Advance Java Training Course Online Advance Java Training Course for programmers having experience in Core Java The online advanced java training describes how the advance Java is important for any software company, its future
Java IO Reader
Java IO Reader In this section we will discuss about the Reader class in Java... of character streams reader synchronization of critical sections is depend.... In such type of character streams reader synchronization of critical sections is depend
Java implementation problem
Java implementation problem  I want to implement following in java... data (LC') end My problems: There is no need of synchronization. hence i can't.../answers/viewqa/Java-Beginners/28578-java-implementation-problem-.html
Features of Java
Features of Java: Java is one of the most popular language in the field... programming is its large number of important and robust features. Java can be used... applications. Java has various important features: SIMPLE Java
programs - Java Beginners
. Write a Java program to demonstrate the concept of synchronization by using.... (by using methods of minimum and maximum of numbers) 3. Write a Java program to demonstrate inheritance. 4. Write a Java program to demonstrate dynamic
programs - Java Beginners
. Write a Java program to demonstrate the concept of synchronization by using.... (by using methods of minimum and maximum of numbers) 3. Write a Java program to demonstrate inheritance. 4. Write a Java program to demonstrate dynamic

Ads