Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / October 2006

Tip: Looking for answers? Try searching our database.

Design Patterns - Observer

Thread view: 
tim@nocomment.com - 07 Oct 2006 01:04 GMT
I have been looking at this pattern and it does make sense to me,
except for one thing.

I thought Java was "pass by value". This pattern seems to me to only
make sense if it is using "pass by reference". Am I missing something
here?

Can you use this pattern with "pass by value"?
Arne Vajhøj - 07 Oct 2006 01:53 GMT
> I have been looking at this pattern and it does make sense to me,
> except for one thing.
[quoted text clipped - 4 lines]
>
> Can you use this pattern with "pass by value"?

You can use it in Java.

Why should pass by value be a problem ?

Arne
Manish Pandit - 07 Oct 2006 01:58 GMT
Can you explain the scenario you are trying to address with this
pattern, and the challenge you are facing?

-cheers,
Manish
Matt Humphrey - 07 Oct 2006 02:02 GMT
>I have been looking at this pattern and it does make sense to me,
> except for one thing.
>
> I thought Java was "pass by value". This pattern seems to me to only
> make sense if it is using "pass by reference". Am I missing something
> here?

Java is pass-by-value and the value passed for an object is its reference.

Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/
tim@nocomment.com - 07 Oct 2006 02:10 GMT
> >I have been looking at this pattern and it does make sense to me,
> > except for one thing.
[quoted text clipped - 6 lines]
>
> Matt Humphrey matth@ivizNOSPAM.com http://www.iviz.com/

Thanks. I was reading up on it and just found it myself.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.