[Bluej-discuss] Ex 4.51
Brian Brookwell
brian.brookwell at shaw.ca
Wed Oct 4 18:41:24 BST 2006
On 4-Oct-06, at 11:38 AM, John Simonds wrote:
>
> I have the following code for the for each in exercise 4.51:
>
> public void listNotes( )
>
> {
>
> index = 0;
>
> for(int index : index ++) {
> ^ should be a semi-colon and for loop
> has three components eparated by ; not two
>
> System.out.println(notes.get(index));
>
> }
> }
>
> This results in an error. I am not understanding why it doesn't
> see index as a variable.
> John Simonds
> Systems Technologist
> simonj2 at sage.edu
> (518)244-3111
> (518)292-1734
>
>
> _______________________________________________
> mailing list bluej-discuss at bluej.org
> To unsubscribe or change your preferences, go to
> http://lists.bluej.org/mailman/listinfo/bluej-discuss
More information about the bluej-discuss
mailing list