Good Practices When Working With Methods

Let us remind you that a method should do only one defined task. If this can not be done you must think how to divide the method into a few, smaller ones. As we already said the name of the method should be clear and should describe its purpose. Another good practice in programming is to avoid methods, which are longer than our screen (approximately). If the code still becomes large it is recommended to divide it into several, shorter methods, as in the example below.

results matching ""

    No results matching ""