Bill in Baltimore
When you do things right, people won't be sure you've done anything at all.
Bill in Baltimore
Bill in Baltimore
William Peck wrote:Ok, thanks for the reply.
>>The first "Dog" is declaring, in basic watered down terms, what the reference 'd' is going to be a reference to.
- but doesn't "new Dog() declare what "d" is ?
>>The reference can hold anything of that type or its subclasses
So "d" can hold an animal or any subclass, such as Dog ?
>>Animal someAnimal = new Animal(); // what the heck do you get?
- I don't know . . . a new Animal ???
>>In reality, Animal would probably be abstract.... meaning you wouldn't be able to instantiate it...
- What makes it abstract ? Why can't I instantiate it ?
When you do things right, people won't be sure you've done anything at all.
When you do things right, people won't be sure you've done anything at all.
Bill in Baltimore
When you do things right, people won't be sure you've done anything at all.
Bill in Baltimore
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Bill in Baltimore
Then YOU must do the pig's work! Read this tiny ad. READ IT!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|