You can use any data type for a parameter of a method or a constructor. This includes primitive data types, such as doubles, floats, and integers, as you saw in the computePayment method, and reference data types, such as objects and arrays.
Read moreCan a constructor have a parameter list?
Default constructors typically have no parameters, but they can have parameters with default values .
Read more