MyClass MyObject =new MyClass(); | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

MyClass MyObject =new MyClass();

MyClass MyObject =new MyClass(); what is happening here? First time, the storage address is getting generated for MyObject. Anything else is happening here? Anyone please explain.

8th May 2019, 9:14 AM
mohan borkar
mohan borkar - avatar
1 Resposta
+ 7
An instance of the MyClass class is created and is referred to by the MyObject variable.
8th May 2019, 9:50 AM
Sonic
Sonic - avatar