Question on calling new version of variable

Car myCar = new Car(“red”);

What does the new Car Red do here? I know there is a similar process to create an array but I am unsure of this one. https://www.codecademy.com/courses/learn-java/lessons/learn-java-methods/exercises/adding-parameters

new invokes the constructor method of the class, rendering a myCar instance of Car with an instance variable by some name given the value, 'red'.

2 Likes