Hi 1blkls1,

Homework is not normally encouraged, but I will give you a tip. Define the data type for the variables. Just putting p=200000 will do nothing. You need to define it, is it an int? double? long? float? String? Object? Integer? I expect an int/double since your final answer seems to be a double. Second, and finally, your monthlyPayment expression uses ^ -n. The ^ character probably meaning to the power of, which is not defined as ^ in java, or in any language that I know of but scripts in excel and other programs. You should use a predifined function in the Math class. Check out the java documentation for the Math class at the Java 1.5 API docs:

http://java.sun.com/j2se/1.5.0/docs/api/

Search for Math under all classes then look for a function for "power"

Hope this helps,

Joe P

Homework is not normally encouraged, but I will give you a tip. Define the data type for the variables. Just putting p=200000 will do nothing. You need to define it, is it an int? double? long? float? String? Object? Integer? I expect an int/double since your final answer seems to be a double. Second, and finally, your monthlyPayment expression uses ^ -n. The ^ character probably meaning to the power of, which is not defined as ^ in java, or in any language that I know of but scripts in excel and other programs. You should use a predifined function in the Math class. Check out the java documentation for the Math class at the Java 1.5 API docs:

http://java.sun.com/j2se/1

Search for Math under all classes then look for a function for "power"

Hope this helps,

Joe P