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
Can we use synchronized block for primitives?
What is anagram number?
What is the difference between numeric and integer?
What is nested class?
What is the main purpose of java?
How does enum work in java?
How to sort elements in a parallel array in java?
Is sizeof a preprocessor?
How many techniques can be employed to create a string object?
What is java full form?
Explain the reason behind ending a program with a system.exit(0)?
What are advantages and disadvantages of OOPs?
What is oop in java?
How are java objects passed to a method and what are native methods?
What is hashing principle in java?