Re: a very tricky question...



birensubudhi@xxxxxxxxx wrote:
In java [sic] in object only the nonstatic members are present & the static
members donot reside in the object but we are accessing static members
using object reference technique.

The static member still has to reside somewhere. It isn't in limbo. Static members reside in the class itself. The class is like an object itself - it has member references and member methods, those marked 'static' in the class definition.

since the static member do not reside in the object

There is no "the object". Static members reside in another object, the one representing the class itself.

then how we are accessing it using object reference...

Two different things, objects and references.

Objects referred to by instance members don't "reside in the object" either. A reference lives inside an object, either in an instance object or the class itself. The reference points to another object or to 'null'. The referenced object doesn't "reside in" anything but heap, conceptually.

Classes and instances don't have member objects. They have member references. References point to objects. Objects don't "reside in" other objects. References do, sometimes, but not necessarily in instance objects. The place from which a reference points and the place to which it points are two different things.

--
Lew
.



Relevant Pages

  • Re: relating two tables with common field but not seeing data in forms.
    ... >this should bring up the query design grid with your two tables shown. ... >database table when you get a new csv file. ... >> member datafields to each record. ... >> example, to keep it simple, one reference number field and name field. ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Dumb Question About External References
    ... The ccp_01 class doesn't have a IsPostback member! ... Cannot access a nonstatic member of outer type 'ASP.ViewState02_aspx' ... An object reference is required for the nonstatic field, method, ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Passing a form reference gives error
    ... Define an Interface with two methods: ... then the form reference implements the ... member called lstFormControls. ... compiler and shouldn't matter at runtime. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: With .... End With - Speed
    ... It would for example be very easy to knock up a speed test that passed a deeply nested member of a UDT to a function by reference and have that function perform a loop incrementing the value by one many times within the loop inside the function. ... As I often say, it's horses for courses and in most real world applications there is nothing whatsoever to be gained from following your suggestion, and it certainly doe not add to the readability of the code, especially since in most real world implementations of a typical With / End With loop you would need to passd the function a lot more than just the item you wanted it to act on. ...
    (microsoft.public.vb.general.discussion)
  • Re: ADAM:Delete an DN - What should happen?
    ... What you have is called "DN value" or "DN reference". ... automatically removed from all groups that he was a member of. ... > another area of ADAM ... > location to determine if the entry was actually gone and I ...
    (microsoft.public.windows.server.active_directory)