Design Patterns - Observer

T

tim

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"?
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

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"?

You can use it in Java.

Why should pass by value be a problem ?

Arne
 
M

Manish Pandit

Can you explain the scenario you are trying to address with this
pattern, and the challenge you are facing?

-cheers,
Manish
 
M

Matt Humphrey

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 (e-mail address removed) http://www.iviz.com/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
474,266
Messages
2,571,082
Members
48,773
Latest member
Kaybee

Latest Threads

Top