If two threads call a static method at the same point of
time, what will happen?
Answers were Sorted based on User's Feedback
Answer / terlis
if the method is not synchronised, two threads can acees the same method at the same time and there will be inconsistency.
Is This Answer Correct ? | 9 Yes | 2 No |
Answer / ashutosh dhar
Nd if it is Synchronized then which thread to be choosen
depends upon the OS.
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / amitasite
If method doesn't access static member variable but only
local variable then there is no inconsistency.
Is This Answer Correct ? | 1 Yes | 1 No |
What is void in java?
Can we overload final method in java?
Why does java not allow multiple public classes in a java file ?
Can we iterate through collection using for loop?
when we create singleton design then we create private constructtor..so how JVM take private constructor to make object..but it's private..
Is java a prime method?
What is immutable in java?
Explain cookies?
How do you escape in java?
Why is singleton not thread safe?
Can we declare the static variables and methods in an abstract class?
What is a method signature java?