Question: In java, a new method that takes a parameter that represents an array of unique car objects is created, and it computes and returns the
In java, a new method that takes a parameter that represents an array of unique car objects is created, and it computes and returns the number of each type of cars in that array.
-
Should the method be static or non-static? explain
-
Give an example of how you would call this method from outside the Car class to determine the number of different cars in an array of Car objects called diffCars.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
