This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes say what? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "say what?" Watch "say what?" New topic

say what?

Ra Carter
Ranch Hand

Joined: Jul 30, 2005
Posts: 96
i got this from a scjp book somewhere. i understand why it compiles and runs but I dont get the output. here is the code:

and from the command line:

what i dont get is what happened to the "-" character? shouldnt this be part of the parameters?
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
In the loop, the condition increments the value of x before the statements in the body of the loop are executed.
I agree. Here's the link:
subject: say what?
It's not a secret anymore!