- Sep 11, 2004
- 14
- 0
- 0
In C++ or any programming language if we define a variable then it carries a garbage value if not assigned.
Similarly what would be the default value if an object is not assigned.
I was working with intellij editor it was prompting an error ( if i did not assign a value to primitive data types, but in case of an object it was not showing any error) so what could be the default value of an object or why it was not prompting an error in case of object.
kindly clarify

Similarly what would be the default value if an object is not assigned.
I was working with intellij editor it was prompting an error ( if i did not assign a value to primitive data types, but in case of an object it was not showing any error) so what could be the default value of an object or why it was not prompting an error in case of object.
kindly clarify