\(=\frac{1}{2} CV ^{2}=\frac{1}{2} 500 \times 10^{-6} \times 10^{4}\)
\(=\frac{5}{2}\,J\)
Current will be maximum when whole energy of capacitor becomes energy of inductor.
\(\frac{1}{2} LI ^{2}=\frac{5}{2}\)
\(I =\sqrt{\frac{5}{ L }}=\sqrt{\frac{5}{50 \times 10^{-3}}}=10\,A\)