0

i cant understand the new keyword

5th Jun 2020, 7:30 PM
venkata bhavane chandra mouli kambhampate
venkata bhavane chandra mouli kambhampate - avatar
2 Respuestas
+ 3
Class_name obj = new Class_name(); The new keyword is used to create an object of type Class_name and 'obj' holds it's reference. The new keyword simply asks for a memory to be allocated for the newly created instance. Both object and instance are same thing.
5th Jun 2020, 8:58 PM
Avinesh
Avinesh - avatar