How to make a method thread safe without using synchronized
keyword?
Answer Posted / aravinda reddy
Oneway of doing By making all the variables and methods in
the class as final.
| Is This Answer Correct ? | 3 Yes | 3 No |
Post New Answer View All Answers
Can we force the garbage collection to run?
What is nullpointerexception in java?
What are the differences between graph and tree?
Is cout buffered?
Explain what access modifiers can be used for methods?
Can a class have more than one object?
What happens when you invoke a thread’s interrupt method while it is sleeping or waiting?
Why singleton pattern is better than creating singleton class with static instance?
What language is an assembler written in?
How many types of memory areas are allocated by JVM in java?
Is main a function?
Can we have static methods in an interface?
What is overriding in java?
Why declare Main() method as a static in java ?
Can two objects have same hashcode?