On Sat, Jun 5, 2010 at 10:57, B Smith-Mannschott <[email protected]> wrote:

> Runnable[] r = new Runnable[3];
> for (final int i = 0 ; i < 3; i++)
>  r[i] = new Runnable() {
>    public void run() { System.out.println(i); }
>  };
> for (int i = 0; i < 3; i++)
>  r.run();
>
> Prints 1 2 3

Prints 0 1 2

duh
//Ben

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to