java - Print methods not called when running, called when debugging -


I created a square with four methods I put a print statement in them, so I could see if they were properly Do the work. There is no problem in the first three but when I call the fourth method, then nobody prints. It is amazing that when I start the debugger and step by step by step, the statement (and output printed) is called. How is this possible?

Thanks in advance.

The method in question:

  public zero Robin (int counter, int quant, int penalty) {If (Schedulers.quant == - 1) {Schedulers.quant = Quant; } While (p! = Null & amp; amp; p.getArrival () == counter) {qrobin.add (p); If (i.hasNext ()) p = i.next (); Other {P = Faucet; break; }} If (active! = Null) {if (active.getLeftOver ()> gt; 0: 0 & amp; amp; Scheduler.q & gt; {0} {active.decreaseLeftOver (); Schedulers.quant--; System Out.print (active.getPID ());} and if (active.gate leftvove ()> gt; 0 & amp; amp; scheduler.quant == 0} {qrobin.add (active); active = qrobin.poll (); Schedulers.quant = Quant; Schedulers.quant--; if (active! = Null) {System.out.print (active.getPID ()); active.decreaseLeftOver ();} Else System.out.print ( "");} And {active = qrobin.poll (); Schedulers.quant = Quant; Schedulers.quant--; if (active! = Null) {System.out.print (active.getPID ()); active DecreaseLeftOver ();} Else System.out.print ("");}} and {active = qrobin.poll (); Schedulers.quant = Quant; Schedulers.quant--; If (active! = Null) {System.out.print (active.getPID ()); active.decreaseLeftOver ();} Else System.out.print ("");}  

}

The code that calls it:

  while (true) {algorithm (algorithm, s, counter); counter ++;}  

It does not seem that there is a clear answer, and without rest we do not reproduce this project Can not analyze and analyze the problem.

The way to solve such indispensable behavior, as far as possible, to reduce the code while preventing behavior; related to it, see that the problem is still; If not, add some code back, etc. Ultimately, you may be able to point out the change that causes the problem and it determines what actually happens from there.


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -