Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • @jlordo yes - already dealt with, including a better alternative IMHO :) Commented Mar 28, 2013 at 21:02
  • Why not while( ( in = keyboard.nextInt() ) >= 0 ) ? Commented Mar 28, 2013 at 21:08
  • @PM77-1 you can do that, but it's considered poor practice to use this kind of syntax - the CheckStyle plugin considers this a problem. see my edit regarding using for loop, which is clearer and cleaner. Commented Mar 28, 2013 at 21:11