In this study people over 65 without cognitive impairment were interviewed, particularly on what is called their subjective age - which means how old they feel. Those who tended to say they felt old - effectively being more pessimistic about ageing in these years - were more likely to end up with a diagnosis of cognitive impairment or dementia at the end of the study (2-4 years later).
It is well worth saying also that this chance was increased when individuals were inactive and feeling depressed.
In any research of this type the results are indicators only - not everyone who felt themselves to be 'old' developed dementia, neither did every person with a 'young' outlook avoid it; but the chances were better for those who were active, and didn't focus on the negatives of 'being old' so it could be another piece in the puzzle of dementia.
Certainly there is a link between depression and dementia and we know form lots of research that exercise and physical activity can help keep depression at bay or under control - so stay physically active, try to keep up your lifelong activities as much as you can - even try new ones!
And add to your chances of good physical and cognitive health by follow the eating advice in my books.