164k views
13 votes
1 pts The ______ keyword creates an object in memory and assigns the memory reference to the variable. Group of answer choices new static private public instantiate

User Chupik
by
5.0k points

1 Answer

5 votes

Answer:

new

Step-by-step explanation:

The new keyword lets you create an object in memory (specifically the heap) and assigns the memory reference to whatever variable you were using for it (for example, if you did int* variable = new int(5);, a new integer would be created on the heap with the value 5, and a reference assigned to variable).

User AkiRoss
by
4.2k points