Android software updates: How can I tell if I can update a device? I keep seeing Android devices in shops that state what version of Android is installed. Thence I conclude that not all Android devices can be updated to a current version of Android.

How can I tell before I buy (or even after I buy) if a device can be updated to the newest release or not?

Can Samsung's Android devices usually be updated?

Update: Note that I am not refering to abandoned devices but to current devices available in stores now.
There's no guarantee that any device will ever see an Android OS update. 

A Nexus device will probably see two, maybe three, updates (if the past is any guide). 

Devices from big-name manufacturers will probably, eventually, see one Android upgrade. However, considering the resources needed to modify the Android source to fit with their customizations as well as to do all that testing, which will result in exactly no incremental income for them, it's in their interest to get you to buy a new phone.

Lower-end/older devices from the big names or devices from OEMs you've never heard of will probably never get an OS upgrade.

Fortunately, a lot of core functionality is being pulled out of the OS into the Google Play Services framework. That'll leave things like hardware APIs in the OS level, which probably wouldn't benefit from an OS upgrade anyway. (I mean, you can't install a bigger sensor for your camera, so OS support for bigger sensors won't help you.)