Originally posted by Ilja Preuss:
That is supposed to mean that you can't call methods that are *only* implemented in the Snowboard class - methods that don't override methods in Object.
Originally posted by marc weber:
When we say...
Animal myDog = new Dog();
...the reference to the Dog object is implicitly upcast to the supertype Animal. This is an example of assignment conversion (in this case, a widening reference conversion).
"In simple terms, polymorphism lets you treat derived class members just like their parent class's members." (Ref: Wikipedia: Polymorphism.) In this case, we are treating an instance of Dog as the parent type, Animal.
So with this upcasting, I think we do have polymorphism here. But we're not going to see polymorphic behavior until we call a method using this reference. For example, when we call the makeNoise() method on this Animal reference, we get Dog's implementation of the method...
...with polymorphism, the reference and the object can be different. (e.g. Animal myDog = new Dog();
Originally posted by Fred Rosenberger:
your variables e1 and e2 are really both pointers to objects. they're like pieces of paper with your bank account number on them.
so when you say "Echo e2 = e1", your saying "give me a new piece of paper with same bank account number written on it as is written on that first one."
so now, you have two slips of paper, both referring to the same account. so, any time you use EITHER one to add a dollar to your account, the SAME account gets more money.
Originally posted by Rauhl Roy:
does it mean
portal are web sites and
portlets are web pages.
please correct me if i am wrong
Originally posted by Keith Lynn:
3. Foo in that context identifies what type of reference d is.