Question: hi I have an `UITableView`. It loads numberof data from a web service. What I want to load this tableview 10 by 10.Initially it loads first 10 items. When user scroll to the end of the `UITableView` it should load next 10 of records from the server. so in my `scrollviewDidEndDeclarating` delegate I put like this

`

```
 if (scrollView.tag==24) {

    [self performSelector:@selector(loadingalbumsongs:) withObject:nil afterDelay:0.1];
}`

```

but the problem is when I stop the scroll it is getting stuck untill load the table view. Can anybody give me a solution for this

Thanks

Answer: 
`getDeclaredField` is a method part of the [Java Reflection API](http://docs.oracle.com/javase/tutorial/reflect/), its purpose is to find a **java field** (aka *instance attribute*) that has been defined in the specific class you are querying for the field, as opposite to `getField` which will try to find the specified field across the whole class hierarchy.

You would just use it just if your class `TableRecord` would have been defined like this:

```
public class TableRecord {

   public Date StampDate;
   // other fields

}

```

However, as your code shows, you are looking for something else. **Your class `TableRecord` doesn't have a field named `StampDate`, it rather has a property named `stampDate`**. There are two approaches here, one could be using [Introspection](http://www-inf.int-evry.fr/COURS/java/javatutorial/javabeans/introspection/index.html) and the other one using Reflection but fetching the method `getStampDate` instead of the field.

Using Introspection you would do something like:

```
BeanInfo bi = Introspector.getBeanInfo(o1.getClass());
PropertyDescriptor[] properties = bi.getPropertyDescriptors();
// iterate over 'properties' and look for a property named 'stampDate'
// you then need to do the following
Date stampDate = (Date) stampDateProperty.getReadMethod().invoke(o1);

```

Using Reflection (maybe easier as you are already half way there):

```
Method method = o1.getClass().getDeclaredMethod("getStampDate");
Date value = (Date) method.invoke(o1);

```

For reference, take a look at the [JavaBeans spec](http://docs.oracle.com/javase/tutorial/javabeans/).
`getClass().getDeclaredField` is used to get the value of a `field` reflectively.The statement 

```
 Date d1 = (Date) o1.getClass().getDeclaredField("StampDate").get(o1);

```

will return the value for the field `StampDate`. As it is throwing `java.lang.NoSuchFieldException` it means this field is not present in the class or there is some spelling mistake. Try changing `StampDate` to `stampDate`.

`getDeclaredField` gives all fields declared in the current class (not of any base classes) and `getField` gives all public field up the entire class hierarchy. If the `StampDate` is declared in any of the super classes, you can access that by using `getField`.