I have a class named Facility. I created 3 objects of it. During program execution, more objects will be created. Now I want some way to get all the objects of the class named Facility. Some iterator or something would do.
Facility obj1 = new Facility ();
Facility obj2 = new Facility ("Facility NY",10);
Facility obj3 = new Facility ();