Object-oriented programming in Java.
Any data type could be used for the constructorís or methodís parameter. Primitive data types are included in it like floats, integers and doubles, as it has already been seen in computePayment method. Reference data types are also included like arrays or objects.
Method which will be accepting array to be as argument has been shown in the given example. In this given example a new polygon object is being created by the method which initialized from Point objects array.