Why we use static and synchronized in method for single
thread model
example:
public static synchronized add(){}
Answer Posted / sameer
Ststic means it belongs to class.When u call a syncronized
method u keep the luck of that class.
| Is This Answer Correct ? | 2 Yes | 4 No |
Post New Answer View All Answers
What is exception handling in java?
What is a null class?
What are the differences between Java 1.0 and Java 2.0?
Can you explain the private protected field modifier?
Is there any difference between nested classes and inner classes?
What is independent and dependent variables in research?
What is method in java with example?
Can each java object keep track of all the threads that want to exclusively access it?
How do you declare a string variable?
Compare java and python.
What is hash code collision?
What is difference between Heap and Stack Memory?
What is the largest number a double can hold?
What is string pooling concept?
Is it possible for a yielded thread to get chance for its execution again?