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
What is polymorphism and what are the types of it?
Can a class declared as private be accessed outside it’s package?
Which is the best approach for creating thread ?
Difference between notify() method and notifyall() method in java?
What is a flag and how does it work?
What are the differences between throw and throws?
How do you detect memory leaks?
What is the difference between serializable and externalizable interfaces?
Differentiate between overriding and overloading cases?
Is java a digit method?
What is double word?
What is static and final keyword in java?
Can inner class be public in java?
What are the classes of java?
What is meant by data hiding in java?