Zebra0.com

alice arraysArrays: Working with lists of objects

Arrays: Working with lists of objects


Text of video

Download the Alice project: array-objects.a3p

public void myFirstMethod() {
    SJointedModel[] animals = new SJointedModel[] {
        this.yeti, this.tortoise, this.stuffedTiger
    }
    ;
    eachInTogether( ( SJointedModel actor )-> {
        actor.say( "hello" );
    }, animals );
} 

Next: The animals talk: Parallel Arrays