Question: ```
ArrayList<yellowPage> ob1 = new ArrayList<yellowPage>(); 
yellowPage thing = new yellowPage(100,100);
thing.calc(i,y,s3); 
ob1.add(thing);

```

I stored some data in `thing`. How can I retrieve the value stored in `ob1.thing`?

Answer: 
If you know the index, you can do yellowPage 

```
yellowPage yp = ob1.get(index);

```

Otherwise you need to iterate over the list.

```
Iterator<yellowPate> iter = ob1.iterator();
while(iter.hasNext())
{
    yellowPage yp = iter.next();
    yp.whateverYouwantGet();
}

```

Note: I just typed code here, there may be syntax errors.
Use an Iterator object to do this.

```
 ArrayList<yellowPage> ob1 = new ArrayList<yellowPage>(); 
 yellowPage thing = new yellowPage(100,100);
 thing.calc(i,y,s3);    
 ob1.add(thing);
 yelloPage retrievedThing = null;
 Iterator<yelloPage> i = ob1.iterator();
 if(i.hasNext()){
      retrievedThing = i.next();
 }

```