Maybe you are a car collector, like Jay Leno. You want to have dozens and dozens of cars. Some will be porsches, some corvettes, some yugos. It would be nice if you could put them all into a list.
Now,
Java only lets you put one type of thing into a collection. You don't want to have a porsche list, a corvette list, and a yugo list - you want a list of cars - so that's what you do. then, since all of these ARE cars, you can put them all into the collection.
Then you want to start each and every car once a week (to keep it in good condition). you want to iterate through your collection and call each car's start() method. you can do this:
There are several beautiful things about this. first, you don't need to code it like this:
Look at these two code examples. Now imagine that after a few years, we decide to buy a bmw. In the first example, i don't need to touch my code, and it will handle a bmw just fine.
That is so cool, it bears repeating. the first code example can hand object types THAT DIDN'T EXIST when i wrote it. the less I have to touch code, the less likely i am to introduce a bug.
the second code example would need to be updated each and every time I want to buy a new type of car. That sucks.