Question: I have a ListActivity that is currently displaying a list of type Data objects. These type Data objects have custom data:

```
String title;

```

The following is in my ListActivity constructor:

```
List<Data> values = dataInterface.getAllData();

ArrayAdapter<Data> adapter = new ArrayAdapter<Data>(this,
    android.R.layout.simple_list_item_1, values);
    setListAdapter(adapter);

```

The application displays on screen all the Data objects without error.

The problem is that the text displayed for each list item is:

```
Data@42731008
Data@427362c0

```

and so on.

I understand these are the object id's of the Data objects. Instead, I want to display the Strings found in Data.title. I can't figure out how to accomplish this.

Answer: 
If you don't want to use a custom Adapter, then define the `public String toString()` method in your `Data` class as follows:

```
public String toString {
   return title;
}

```

It will be used by the ArrayAdapter when it represents the object in the ListView.
In your adapter :

```
holder.myTextview.setText(getItem(position).getTitle());

```

The point is in the `getItem(position).getTitle()`, because your custom adapter extends `ArrayAdapter<Data>`, `getItem(position)` will return an instance of `Data`. 

After that, you just need to get the title from the `Data` using `getTitle();` (**depends** on your setter - getter in you `Data` class).

Just comment if you dont understand something or if i miss understand you :)