summation in java using for loops

I am trying to make a summation calculator for the following equation:

http://i595.photobucket.com/albums/t...60/sinesum.jpg

Where i is the lower limit (in this case it will always be 0) and n is the upper limit (in this problem the user will be asked to enter an integer value of the upper limit).

Here is my code (so far):

import java.io.*;

public class summation

{

public static void main(String args[]) throws IOException

{

BufferedReader keybd = new BufferedReader(new InputStreamReader(System.in));

int ul;

System.out.print("Enter the upper limit: ");

ul = Integer.parseInt(keybd.readLine());

}

}

I don't understand how to use a for loop to calculate the sum.

After that I got stuck. I appreciate any help i can get thanks! :)