This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Flow Controls Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Flow Controls" Watch "Flow Controls" New topic
Author

Flow Controls

Shreelakshmi Sridhar
Greenhorn

Joined: Apr 11, 2004
Posts: 3
The output for the following program says i=0,j=-1 can anybody explain the flow...

Thanks in advance
Code tags added and re-formatted - Barry
[ April 11, 2004: Message edited by: Barry Gaunt ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
It's a good idea with these problems to instrument the code a little by introducing some System.out.println statements, thus:


The output is:

Is it clearer now what's happening?


Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Shreelakshmi Sridhar
Greenhorn

Joined: Apr 11, 2004
Posts: 3
i got it thanks for that...
 
GeeCON Prague 2014
 
subject: Flow Controls