Objektorientierte Programmierung in JavaopenHPI-Java-Team

This video belongs to the openHPI course Objektorientierte Programmierung in Java. Do you want to see more?

3.7 Polymorphie

Time effort: approx. 10 minutes

An error occurred while loading the video player, or it takes a long time to initialize. You can try clearing your browser cache. Please try again later and contact the helpdesk if the problem persists.

About this video


Folie 1: Hier sollte das Array gleichmäßig mit drei Elementen gefüllt werden und nicht immer das Element an Index-Position 0 überschrieben werden. Korrekt soll es als wie folgt lauten:

Parrot[] array = new Parrot[3]; 
array[0] = paco;
array[1] = polly;
array[2] = penny;