C:\slop>javac Mortcalcjp2week3.java
Mortcalcjp2week3.java:54: illegal start of expression
private int term;
^
Mortcalcjp2week3.java:303: class, interface, or enum expected
public void validateUserInput(JTextField principal_txt, JTextField rate_
txt, JTextField term_txt) {
^
Mortcalcjp2week3.java:309: class, interface, or enum expected
} catch (NumberFormatException e)//Action listener
^
Mortcalcjp2week3.java:313: class, interface, or enum expected
}
^
Mortcalcjp2week3.java:318: class, interface, or enum expected
} catch (NumberFormatException e) {
^
Mortcalcjp2week3.java:322: class, interface, or enum expected
}
^
Mortcalcjp2week3.java:327: class, interface, or enum expected
} catch (NumberFormatException e) {
^
Mortcalcjp2week3.java:330: class, interface, or enum expected
}
^
8 errors
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Grayson Churchel wrote:I'm a noob here but I think I've spotted the problem in your code:
public static void main(String[] args) {
should be:
public static void main(String args[]) {
It's an array of String objects and not an object of type String Array.
I always like to start my debugging by looking for simple and silly mistakes I've made.![]()
Drove my Chevy to the levee but the levee was dry. A wrung this tiny ad and it was still dry.
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|