Using Car Constructors – Intro to Java Programming


Now that we’ve added the two constructors, we can see them in BlueJ. I right click on the car class and here they are, pick the second one. Now let’s supply both parameters. And here is our car. The other constructor. Only requires one parameter, and we get a car with a default image. Now I’ll turn it over to Sarah so you can practice writing constructors for the person class.

Leave a Reply

Your email address will not be published. Required fields are marked *