0
i cant understand the new keyword
2 Respostas
+ 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.