Campbell Ritchie wrote:The more you change, particularly if you comment bits out rather than deleting them, the harder the code becomes to read. Also the longer the main method gets. You should avoid long methods.
One of your methods should read a line from a Scanner. I would actually put that in a different class. Have you been told what Scanner#nextLine() does? If yes, were you told correctly? There are even books which give the wrong answer to that question. A few hints about Scanner will be found here and here.
Stuart A. Burkett wrote:What do braces { } do ?
Where are you checking the value returned from the scanner ? Immediately after the call to scan.nextLine or after you have overwritten it on line 27 ?
Campbell Ritchie wrote:Most of us simply read the Tutorials online, so we never use a downloaded version.
Winston Gutkowski wrote:
Mike Philips wrote:I appreciate your views, but you must empathise with mine and see the reasons that I may choose to use one. There is no ultimate 'right' answer here, I agree with the points you make and I understand them, and I'm still using an IDE. Lot's of very reputable courses use IDE's, it's not a crazy concept.
OK, but then you need to take the time to separate what your question actually is from the IDE you're using; otherwise you're asking us to do it for you and plough through a lot of irrelevancies about the IDE.
Java is Java is Java, and you're in a Java forum.
And there's no point in saying that your thread wasn't about IDEs, because as soon as you got your downloads, the next question was "how do I deal with these in Eclipse?".
Winston
Winston Gutkowski wrote:
Mike Philips wrote:Yes, I imagine they're great for bad spellers in general... I can barely write English (my native language...) without the aid of a computer. My spelling (and grasp of) is atrocious.
Sounds like a justification for laziness to me.
The fact is that computers in general - not just Java compilers - do exactly what they're told; so if you don't learn to spot mistakes early on (and spelling is big one), you're going to land yourself in deep caca one of these days.
As to the IDE/non-IDE argument: I don't think anyone's saying that you should never use an IDE; just that right now may be a bit too soon. It also means that questions are couched in terms of the IDE you're using, rather than what you're doing; so if we don't happen to have it/use it, we're unlikely to be able to help you.
It's probably also worth mentioning that we have a forum specifically targeted at IDEs (look under "Engineering : IDEs, Version Control and other tools"), so perhaps your question would be better targeted there. If you'd like one of us to move this thread there for you, let us know and we'll be happy to do it.
Winston
Bear Bibeault wrote:Are there formatting options you are looking for that aren't available via the buttons at the top of the posting box?
Campbell Ritchie wrote:The if statement checks one letter only. It is called up to thrice. It checks for letters which are not equal. If you get a non‑matching value, it calls continue on the outer loop.