Hi I have a class Property and 2 subclasses Shop and Apartment.
In another class I have an arraylist of properties with a mixture of shops and apartments. I have the code:
for(Property prop: properties){
if(prop.getClass().equals(Shop.class))
prop.setShopDetails(detail);
else
prop.setAppDetails(detail)
}
How can I access the method setShopDetails() inside the shop class?