Can any one explain me the above program as ahy its behaving inconsistently.As on linux machine its giving different output and windows its different. Compilation without error, but the exact output cannot be determined. above is the correct answer for above .
SCJP1.5(81%), SCDJWS(94%), next mission SCEA (but need to wait or that)
There is a single object and three threads are working on that. Behavior may vary from execution to execution or plate-form wise. It may be same most of the time or vary at each execution. It depends, how thread scheduling is taking place.
Joined: Sep 17, 2005
even theadscheduling is not working with Java when it come to Threads. Yes, it differ from machine to machine and even compilation, actually in both the cases CPU's TimeCycle changes and there thread gets the way to execute. i want to know, why this kind of machanise Java supports??