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 |
Why cant we define System.out.println() inside a class directly?
How does queue work in java?
How to find the size of an array a)array.length() b)array.length c)array.size() d)array.size
What happens if constructor is private?
how tha garbage collector know that the object will be deleted? on which algorithm the garbage collector works? what is the working principle of garbage collector? How manay types of garbage collectors r there?
Does printwriter create a file?
Functionality of JVM?
How will you initialize an Applet?
how many design pattern r there? and wht design pattern u use and why ?
What is e java?
What is size () in java?
What is empty string literal in java?