Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8415625
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T01:29:53+00:00 2026-06-10T01:29:53+00:00

I have seen few examples of Observer pattern. Why does the update method in

  • 0

I have seen few examples of Observer pattern.

Why does the update method in the Observer interface in some cases include a reference to the object being observed?
Doesn’t the observer know what object it is observing?

Please explain with example.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T01:29:54+00:00Added an answer on June 10, 2026 at 1:29 am

    It may or may not have a reference to the Subject, depending on the concrete problem.

    The Subject might only call the update() function and just set some value in the Observer, thus the Observer does not need a reference. Or it can notify the Observer that there has been a change, and the Observer will contact the Subject by the reference it has and get the new values.

    Holding the reference in the implementation can also be used if the Observers have need to inform the Subject about something.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

From the few examples I have seen around the net, gl_FragData[0] is assumed to
I've seen in a few iPhone examples that attributes have used an underscore _
I have seen a few examples of how to create RSS feeds using ASP.NET
Hi I have seen a few examples of adding breakpoints in gdb using the
I've seen a few examples on here to this problem, but none have solved
I have seen a few examples with <a href=.>link to folder</a> but i realy
I have seen a few examples of Haskell code that use functions in parameters,
I have seen a few examples where the viewModel (in Silverlight apps) is in
I have seen quite a few examples/tutorials on the web for doing one-one shared
I have seen a few examples of these, but mine is a little different

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.