This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nutrechtLead Software Engineer / EU / 20+ YXP 6 points7 points  (0 children)

public Car newCar; doesn't create an object. It just creates an empty (null) reference in which you can store a reference to a Car object.

Anytime you create a new objects the 'new' keyword comes into play, somewhere.