Extracting code into methods

Extracting code into separate methods is a very simple yet super effective technique to clarify the purpose of certain elements and make it easier to understand what is going on.

As we will see, it is also very easy to use in an RxJava setting because basically every part of the flow can be extracted into an independent method that does one thing and doesn't depend on anything else.

Also, modern IDEs, such as Android Studio, make a quick work of refactoring, such as method extraction. In the next section, we will see how we can use IDE to make these extractions super quick and simple.

A more advanced developer can feel free to skip the next section about method extractions because these techniques might seem obvious. However, people who have just started programming on Android will certainly learn some quick tricks which can be used to make their code easier to understand.

Finally, we will use all of these techniques to simplify the existing financial stock quote retrieval code.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.216.77.153