Can you use a 12 volt charger to charge 6 volt batteries?

Some have a switch for 6 or 12V - if not you will "cook" a 6 volt battery using a 12 Volt charger