Both are harmonic oscillators.
In the LC circuit:
- the current current may be seen as the velocity and containing the kinetic energy
- the charge stored in the capacitor as the potential energy
You can kickstart motion in either of those systems in two ways:
- charge the capacitor, i.e. pull the string, and then let it go, i.e. close the circuit. This is the simpler one to realise. Shown concretely at: Video 25. "LC circuit dampened oscillations on an oscilloscope by Queuerious Guy (2014)"
- give speed to the mass, i.e. make a current pass through the inductor