Introduction to OOP: Chapter 4: Messages, Instances, and Initialization: [next] [previous] [audio] [real] [text]

Syntax for Dynamic Creation

Always in Smalltalk and Java, and sometimes in other languages, objects are created dynamically using the ``new'' operator.

d <- Card new. "Smalltalk example"

Card aCard; // Java example
aCard = new Card();
Intro OOP, Chapter 4, Slide 6