[Bluej-discuss] Ex 4.50

Stephen Edwards edwards at cs.vt.edu
Wed Oct 4 15:30:16 BST 2006


John Simonds wrote:
 >     for(int index; index < notes.size; (index ++) }
[...]
> Any idea why the corrected version would then produce 'size 
> has private access in the java util list?

Because "notes.size" is a private data field?  You probably meant
to write "notes.size()" to call the public accessor method instead,
but accidentally left off the parentheses.

                                 -- Steve

--
Stephen Edwards            604 McBryde Hall          Dept. of Computer Science
e-mail      : edwards at cs.vt.edu           U.S. mail: Virginia Tech (VPI&SU)
office phone: (540)-231-5723                         Blacksburg, VA  24061
-------------------------------------------------------------------------------




More information about the bluej-discuss mailing list