I want to override the title of each movie in a list.
I tried to make the x
static and final but the compiler complains.
List<Movie> mList = new ArrayList<Movie>();
for(int i = 0; i < 5; i++)
{
int x;
mList.add(new Movie(){
toString(){
// need an easy way to give a unique string to each movie here.
return "Movie" + x;
}
}
}