If two threads call a static method at the same point of
time, what will happen?

Answers were Sorted based on User's Feedback



If two threads call a static method at the same point of time, what will happen?..

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

If two threads call a static method at the same point of time, what will happen?..

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

If two threads call a static method at the same point of time, what will happen?..

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

Post New Answer

More Core Java Interview Questions

What is void in java?

0 Answers  


Can we overload final method in java?

0 Answers  


Why does java not allow multiple public classes in a java file ?

2 Answers  


Can we iterate through collection using for loop?

2 Answers   Rolta,


when we create singleton design then we create private constructtor..so how JVM take private constructor to make object..but it's private..

1 Answers   Ness Technologies,






Is java a prime method?

0 Answers  


What is immutable in java?

0 Answers  


Explain cookies?

2 Answers   Canon,


How do you escape in java?

0 Answers  


Why is singleton not thread safe?

0 Answers  


Can we declare the static variables and methods in an abstract class?

0 Answers  


What is a method signature java?

0 Answers  


Categories