File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Flow Controls

Shreelakshmi Sridhar

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

Joined: Apr 11, 2004
Posts: 3
i got it thanks for that...
I agree. Here's the link:
subject: Flow Controls
It's not a secret anymore!