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
How to perform linear search in java?
Why do we need autoboxing in java?
Should you use singleton pattern?
Detail discussions on JVM, memory management and garbage collector.
What is a methodologist?
Explain about instanceof operator in java?
What is the use of math abs in java?
Differentiate between postfix and prefix operators in java.
What is the largest long allowed by java?
In java, how many ways you can take input from the console?
How do you use wildcards?
What is Enum in Java?
What is the maximum size of array in java?
Differentiate between the constructors and methods in java?
What is sizeof () operator?