203k views
1 vote
What keyword do we use when instantiating an object _________________

a. create

b. =

c. new

d. Object

e. is

1 Answer

4 votes

Answer:

The correct answer for the given question is option(c) i.e new

Step-by-step explanation:

Instantiating an object means creating a object or creating a instance of a class .

The new keyword allocates a memory for the object .

To create instance we follow following syntax

classname objectname =new classname();

for example

abc ob=new abc();

here abc is a class and ob is an object for that class with the help of new keyword it allocate the memory for the object ob.

create, =,object ,is are not any keyword to instantiating an object.

so the correct answer is " new "

User Muhammad Abrar
by
6.0k points