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.
You could have the data stored in `thing` (horribly named variable) simply returned from the `calc` method. That way you don't need to maintain state for prior calculations in subsequent calls. Otherwise you just need a getter type method on the `YellowPage` class.

```
public class YellowPage { 

    private int result;

    public void calc(...) { 
        result = ...
    }

    public int getResult() { 
        return result;
    }

}

```