Re: About the private member



On Wed, 26 Nov 2008 08:01:28 -0800 (PST), pek <kimwlias@xxxxxxxxx>
wrote, quoted or indirectly quoted someone who said :

OK.. Now I kinda get it. But is there anybody out there that actually
used this type of code? Is it just Java or OO in general? Either case,
where does this help?

see http://mindprod.com/jgloss/scope.html
and follow links to find out all the things you can do.

You might use code like your example in a copy constructor
or a step-up step-down constructor e.g. to convert Dog to Dalmatian or
Dalmatian to Dog.

--
Roedy Green Canadian Mind Products
http://mindprod.com
"Humanity is conducting an unintended, uncontrolled, globally pervasive experiment
whose ultimate consequences could be second only to global nuclear war."
~ Environment Canada (The Canadian equivalent of the EPA on global warming)
.



Relevant Pages

  • Re: cast to sub-class or extending instance of super or a.n.other
    ... You need what is called a copy constructor. ... Java has no easy way of composing one. ... working if Dog acquires any more fields. ... A new Dog takes a Dalmatian and strips it down. ...
    (comp.lang.java.programmer)
  • Re: cast to sub-class or extending instance of super or a.n.other
    ... You need what is called a copy constructor. ... working if Dog acquires any more fields. ... A new Dog takes a Dalmatian and strips it down. ... that go back and forth from MiniZip to BigZip etc. BigZip is just a ...
    (comp.lang.java.programmer)
  • Demoting and Promoting Serialised Objects
    ... I see a general problem I call demoting and promoting objects. ... A Dalmatian gets demoted to Dog object by stripping off its Dalmatian ... Java gain some feature to easily create copy constructor so you ...
    (comp.lang.java.programmer)
  • Re: Demoting and Promoting Serialised Objects
    ... >I see a general problem I call demoting and promoting objects. ... > A Dalmatian gets demoted to Dog object by stripping off its Dalmatian ... Java gain some feature to easily create copy constructor so you ...
    (comp.lang.java.programmer)
  • Re: Please help - dog with kidney failure
    ... Our dalmatian hasn't been eating for the last ... > thought she had blood in her urine - we would see blood on the fur. ... > her back for more fluids tomorrow. ... Change dog breeds: quit buying dalamations. ...
    (rec.pets.dogs.health)