It should be commas you use, not slashes.
Math.pow(rate2/12+1)
should syntactically be in the form of Math.pow(x,y)
where both x
and y
are doubles. The first arg is the base, and second arg is the index you're raising it to. As the comment below mentioned, it's difficult to understand what you're trying to achieve, and you'll have to substitute x and y for the correct values - make sure they're of type double (you cannot use, for example, 12+1
as a parameter because it is an integer). If it is an integer, then type cast it using (double)
in front of the value.
You also do not need to parseDouble
everywhere since Math.pow
will return double values anyways; it is redundant.
I agree with the comment above; please read the javadocs for any problems you're having with a method before posting here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…