Method Argument types: Niladic, Monadic, Dyadic & Triadic

Method arguments come in various flavours.

The method contains no arguments, this one can be easy understand, for example, Java’s ‘ToString()’ method

The method contains a single argument. Java’s base class Object#equals(Object obj)

A method with 2 arguments, for example the String method replace……. replace(char oldChar, char newChar).


Method with 3 arguments
Example StringBuffer’s replace method…. replace(int start, int end, String str)

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.


Leave a Reply

Please log in using one of these methods to post your comment: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s