Math.PI is a double. It should have more than 8 decimal digits. (Well, actually it has binary digits, but when formatted as a decimal there should be more than 8 digits.)
Try using a different formatter.
Or better yet...why do you need pi? What are you planning to do with the value? Why do you feel that the value given by Math.PI isn't good enough?
You're just adding terms together.There's a series of them, so you need a loop. Each pass through the loop could add one more term. Note that each term has a denominator that is bigger by 2, and it's either added or subtracted (or to look at it another way, you're adding negatives alternately).
The main issue is how accurate you want it to be. You can't add the digits together forever. So you have to choose a stopping point. You can stop based on a time period (when you've run out of time, stop adding new terms) or on precision (when two subsequent values are close enough to each other, stop).
You'll probably want to use java.math.BigDecimal.
If you give some more details about the assignment I can make some more suggestions.
Why don't you give it a try and see how it works?
> I'v heard that Leibniz's is the easiest but im taking
> Algebra 2 right now and none of them make much sense
> to me, sorry, but could you help me with that?
Maybe, but I've heard the frozen hotdog method is more fun
http://www.wikihow.com/Calculate-Pi-by-Throwing-Frozen-Hot-Dogs