I have two classes. 1st class extends AppCompatActivity and has all my data like arraylist, constants... My 2nd class extends BaseAdapter. Now the question is: I need to use som
you can pass data in constructor of second class like this:
YourBaseAdapter adapter = new YourBaseAdapter(YourDataType1 data1, YourDatatype2 data2, ....)
all you need to do is create matching constructor in YourBaseAdapter
use setters
and getters
to set and get the date. Other way can be passing through constructor in case you do not want to change it once it has been constructed which is one aspect of immutability