[Bluej-discuss] Ex 4.50

Bruce Barton bartonb at sunysuffolk.edu
Wed Oct 4 14:15:49 BST 2006


Unless there is a typo in what you presented the braces and parentheses
are not correct.
On the line with the for statement the final close brace "}" should be a
close parenthesis ")" followed by an open brace "{".
Also, the open brace "{" after the println statement should be a close
brace "}".
 
Bruce Barton
Asst. Professor of Computer Science
Suffolk County Community College

________________________________

From: bluej-discuss-bounces at bluej.org
[mailto:bluej-discuss-bounces at bluej.org] On Behalf Of John Simonds
Sent: Wednesday, October 04, 2006 9:08 AM
To: bluej-discuss at bluej.org
Subject: [Bluej-discuss] Ex 4.50


I have a puzzle with Exercise 4.50 of chapter 4.  notebook 2 - which is
to take a current while statement and change it to a for loop.  This is
the code I used:
public void listNotes()
    {
       
        for(int index; index < notes.size; (index ++) }
            
            System.out.println(notes.get(index));
        {
and I get a coding error saying not a statement. 
What am I doing wrong? 
John Simonds
Systems Technologist
simonj2 at sage.edu
(518)244-3111
(518)292-1734 
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.bluej.org/pipermail/bluej-discuss/attachments/20061004/17c4dc4c/attachment.html


More information about the bluej-discuss mailing list