This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Looking at your code, it actually prints numbers from 0 to 100, not from 1 to 100, because count starts at 0 in line 11. I'd advise you to use proper indentation, or better yet, surround the statement that's supposed to be in the loop in braces, because the way it looks now is very confusing:
Write it like this:
One way to avoid printing the 100 afterwards is like this:
Thanks for the tipps;) to clear things up about Eclipse,I am taking a correspondence course "Programming with JAVA and Eclipse" ;) that is why i am using it.The course is 15 months plus minus how fast i learn,and i just started 3 weeks ago.
I am going through the books pretty quick as i can't get enough of it !!! Hopefully i won't have to write too many silly questions here but i am glad i found this forum and it seems really active!!!
Joined: Oct 13, 2005
No question is too simple or too small!
on the Beginning Java front page. So you aren't asking silly questions. You have actually hit a common problem called the out-by-one error which will reappear many times in your career the way dandelions reappear on a lawn!
Thanks again and a general question.Is it not a good idea to learn JAVA with Eclipse? Well even if it is i will have to continue it because i have paid quite a bit for the course;)
But i am also using other sources and will be purchasing a book or 2 as well.
I am glad to see allot of participation here though, and maybe i will be able to answer a question or 2 myself eventually ;)
If you're taking a course it most likely won't be that big of an issue, as you have an instructor who can help you through some of the quirks of your IDE. In general though, if you were learning on your own it would be better NOT to use an IDE, because you end up wasting time learning the IDE and not the language.
Joined: Oct 13, 2005
There are also things you learn to do at the command line which you miss because the IDE does them all for you.