we have two threads..both the threads are reading the
data.. is there any need of synchronization
there?...justify it?

Answer Posted / ysr

It depends upon the data.
where the data is chngable by threads at that time we need
to apply the synchronization.
if the data is purly static data no need to protect the
databy using synchronization. why because if we apply
(synchronization) each and every time there is a
performance degradation is there.
Time factor(it will take more time)

Is This Answer Correct ?    29 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are three ways in which a thread can enter the waiting state in java programming?

682


What is the += operator called?

577


What is string in java?

556


What are the differences between checked exception and unchecked exception?

526


Explain wait() method of object class ?

630






Give the difference between the println method and sqrt method?

621


Explain the difference between a Thread and a Process.

556


How do you check if a number is a perfect square?

510


Tell me about different OOPS concepts.

589


If I only change the return type, does the method become overloaded?

535


What is == in java?

563


Is null == null in java?

647


When can you say a graph to be a tree?

635


Explain about map interface in java?

586


What is public/private protected in java?

541