Introduction to OOP | Chapter 5: Messages Instances and Initialization: | next | previous | audio | real | text |
PlayingCard aCard; // simply names a new variable aCard = new PlayingCard(Diamond, 3); // creates the new objectThe declaration simply names a variable, the new operator is needed to create the new object value.