Java Code To Find The Sum OF The Series===============================
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {
int a, n, d = 0, ans;
a = Integer.parseInt(tf1.getText());
n = Integer.parseInt(tf2.getText());
Java Code To Find The Sum OF The Series===============================