All things are lawful, but not all things are profitable.
Sharlene Davis wrote:thanks ive only got 4 errors now woohoo doesnt seem to like the [rand2] syntax though im now using notepad ++
All things are lawful, but not all things are profitable.
Knute Snortum wrote:
This line have four problems. Have you spotted them all?
There are two errors in that line but the compiler produces three error messages for it:-Lisa Austin wrote:. . . In this line I see two clear problems in that actual line of code. . . .
Campbell Ritchie wrote:
There are two errors in that line but the compiler produces three error messages for it:-Lisa Austin wrote:. . . In this line I see two clear problems in that actual line of code. . . .
1: Sting 2: Name of array missed out before its [index] 3: wordList3 declared earlier as WordList3 so you get a can't find variable error. I tried it with Eclipse. The errors came up with a red mark and when I clicked the red mark, I got a dropdwn list of options. In most cases, one of the options had a green arrow and “Change to...” amongst the suggestions for correcting the error. The only error in that class which couldn't be corrected by clicking a “Change to...” option was the missing array name.
I believe variable names with numbers in are bad: it is very easy to confuse wordList1 with wordList2 because the human eye doesn't see numbers as clearly as words and the human brain doesn't think in numbers as clearly as words.
All things are lawful, but not all things are profitable.
That was on a different line; I was only counting them on that one line. I am a Cockney, so I can see oneLenth as the phonetic spellingLisa Austin wrote:. . . the word "oneLength" is misspelled as "oneLenth".
That's a pleasure the more questions you ask the more you will learn.Thank You Ritchie! I hope it was okay that I got involved and asked. . . .
Campbell Ritchie wrote:
That was on a different line; I was only counting them on that one line. I am a Cockney, so I can see oneLenth as the phonetic spellingLisa Austin wrote:. . . the word "oneLength" is misspelled as "oneLenth".
That's a pleasure the more questions you ask the more you will learn.Thank You Ritchie! I hope it was okay that I got involved and asked. . . .
Now, by searching this forum or otherwise, find a way to get pseudo‑random ints starting 0 and all less than the length of that array, better than using Math#random.
Knute Snortum wrote:The fourth error is me thinking there are four errors (ooo, recursion!)
Don't get me started about those stupid light bulbs. |