Some food for thought:
The energy stored in a capacitor rises with the square of the voltage over the capacitor.
This means, that if one battery starts with a higher voltage then the other, and you connect them in parallel, the end result is that the sum of the energies stored in both capacitors is less after the connection. It is a closed system, but the energy has to go somewhere. With a resistor the difference is dissipated as heat, by just connecting a wire you create the sparks. By just adding an inductor, the energy is stored in the inductor, which then starts charging the other capacitor. (With a dampened oscillation because of losses), or it stops by adding that diode.
For any practical use, the size of the capacitors will have a big influence on the circuit.
If it's just for your curiousity, then combining it with learning spice simulations could be a good idea.