answersLogoWhite

0

In most OOP languages, you use the "new" keyword to indicate that you wish to create an object of a given class. Often, that construct will look as follows:

PlayerCharacter pc = new PlayerCharacter("Jane Doe");

The first PlayerCharacter is the "data type" for the variable "pc". Equals ("=") assigns the right-hand value to the left-hand value (pc). The new keyword indicates that you wish to allocate memory for an object and call a constructor. The second PlayerCharacter calls the constructor for the PlayerCharacter class, which expects a single string for the player character's name (presumably).

User Avatar

Wiki User

12y ago

What else can I help you with?