Code

It’s Time To Create A Method

When writing code, it is possible that you will have to do the same thing from more than one location.

If this is true, then it’s time to write a method that is reachable from both locations.

The variations of this include a class where two of its methods need the same functionality, so create a private method that will be called by each method.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s