If a capacitor is connected to a battery, electric charge will flow out of the battery as fast as it can until the capacitor is storing all the charge that it can hold. At this time, the flow of charge will cease and the voltage across the capacitor will equal the voltage of the battery. The capacitor will continue to hold the charge indefinitely, even if the battery is disconnected.