Here is the sample code. Since there is not source to backtrack given a code get the pattern. 

```
ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM Table1");

    while (rs.next()) {
        int x = rs.getInt("a");
        String s = rs.getString("b");
        float f = rs.getFloat("c");
    }

```

I think this is some pattern, has a name and has more applications which I am unaware about. Let me know the pattern name ?
['https://Stackoverflow.com/questions/20344535', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2458372/']
A ResultSet is an instance of the [Iterator](http://en.wikipedia.org/wiki/Iterator_pattern) pattern. But not the `java.util.Iterator` interface.

[Iterator as ArrayList http://ts1.mm.bing.net/th?id=H.4589598971789992&pid=15.1](http://ts1.mm.bing.net/th?id=H.4589598971789992&pid=15.1)
the patten name is "Iterator Pattern".