I am retrieving 2 strings from the http connection. E.g. Name and Description, and will be storing them in 2 different arrays. The arrays would be used by another class of mine. I created 2 methods for searching each of them (searchName and searchDesc). Everything is working just fine but I would like to make it more efficient as I'm not doing so.
I would like to create a connection in one method, read and store the contents in their individual arrays and return the 2 arrays.
In other words, I want the app to only create connection/read through the html codes once only instead of twice(my current code). Instead of creating 2 methods to return only 1 value each, I want a method which returns 2 values. Is it possible and how?