tag:blogger.com,1999:blog-20425712.post5783939759325417314..comments2023-06-27T14:20:37.054+02:00Comments on Constantly Changing: Closures in Java NOW!Attila Szegedihttp://www.blogger.com/profile/11586966395114113526noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-20425712.post-31222137115405272882007-11-12T19:23:00.000+01:002007-11-12T19:23:00.000+01:00"shared" is indeed a private variable, but it's an..."shared" is indeed a private variable, but it's an object reference, and it's possible that several instances of B have their "shared" variable point to some same - external to them, but shared - object.Attila Szegedihttps://www.blogger.com/profile/08179252447170860637noreply@blogger.comtag:blogger.com,1999:blog-20425712.post-30438571451665690972007-11-12T19:16:00.000+01:002007-11-12T19:16:00.000+01:00Hm ...I must be missing something. As "shared" is ...Hm ...I must be missing something. As "shared" is private B will never have access to it. If you provide access to it - that's where you would need to do the synchronization. No?Anonymousnoreply@blogger.com