How to get a arraylist of all objects created of a class code example
Example: how add model class to array list
//main class
SomeClass b= new SomeClass();
list.add(b);
//subclass
Home.MainCategory mainCategory = new Home().getInstranceMainCategory();
mainCategory.mainCatName = getString(R.string.more);
mainCategoryList.add(mainCategory);