Method Argument types: Niladic, Monadic, Dyadic & Triadic
Reading time: 1 minMethod arguments come in various flavours.
Niladic
The method contains no arguments, this one can be easy understand, for example, Java's 'ToString()' method
Monadic
The method contains a single argument. Java's base class Object#equals(Object obj)
Dyadic
A method with 2 arguments, for example the String method replace....... replace(char oldChar, char newChar).
Triadic
Method with 3 arguments
Example StringBuffer's replace method.... replace(int start, int end, String str)
Polyadic
A method that for some reason has more than 3, such as the String method 'regionMatches' which can be confusing to know which order the arugments come in (without looking at the doc)
It looks like this "regionMatches(boolean ignoreCase, int toffset, String other, int ooffset, int len) "
I will be talking more in detail about these method arguments types in a later blog post.
Ced