Instantiating a reference type

suggest change
Object obj = new Object(); // Note the 'new' keyword


What happens:

This is different from primitives:

int i = 10;

Where the actual value 10 is stored in i.

Feedback about page:

Optional: your email if you want me to get back to you:

Table Of Contents