In post #8 you show a stack trace that comes if you have a problem executing the code.
Here is what you posted. To get this, the code had to execute.
Type: Posts; User: Norm
In post #8 you show a stack trace that comes if you have a problem executing the code.
Here is what you posted. To get this, the code had to execute.
The main() method is spelled this way: main
It is a method.
You need to consider the difference between method and classes. The following line defines a class:
public class MortgageCalculator...
No, do not change the class definition line.
Add a main method to the class.
Look at post #8 That code executed. It has a valid main() method.
That is what this error message is complaining about:
java.lang.NoSuchMethodError: main
The class that you pass to the java command must have a main method:
java.exe ThisClassMustHaveMainMethod...
That's strange. How did you execute the code before when you got the NullPointerException?
What did you change in the previous code? That code did start executing because you would not get the...
You left off the code tags.
see: http://www.javaprogrammingforums.com/misc.php?do=bbcode#code
There is a variable on line 118 that has a null value. Look at line 118 and find what variable...
You need to find the definitions for the missing classes and add them to your code.
Or you need to create classes for those that are not defined.
Please copy and paste the full text of the error message here.
The code does not compile because of missing class definitions.
Please edit your post and wrap the code in code tags. Use the Go Advanced button, select your code and press the #icon.
See: BB Code List - Java Programming Forums