• Post Reply Bookmark Topic Watch Topic
  • New Topic

Having trouble with GUI program for mortgage calculator  RSS feed

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My problem is in the public static void main String[]args)

I keep getting an error message that this is an illegal start of expression. I am probably just very tired, as I have been working on this code for 15 hours straight. I cannot figure out why I am getting this error. If anyone is out there that would be interested in giving a go at helping me find my error it would be greatly appreciated!
 
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

That's a lot of code to read through and understand. In which line of code are you getting an exception? Post the complete stack trace.
 
Ruth Copenhaver
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The public static main (String[]args) is at the end of my code line 235. I think it has something to do with the method calls



----jGRASP exec: javac -g C:\Users\r\Documents\WIU\Calculator5GUI.java

Calculator5GUI.java:235: illegal start of expression
public static void main(String[]args){
^
Calculator5GUI.java:235: illegal start of expression
public static void main(String[]args){
^
Calculator5GUI.java:235: ';' expected
public static void main(String[]args){
^
Calculator5GUI.java:235: '.class' expected
public static void main(String[]args){
^
Calculator5GUI.java:235: ';' expected
public static void main(String[]args){
^
Calculator5GUI.java:241: reached end of file while parsing
}
^
6 errors

----jGRASP wedge2: exit code for process is 1.
----jGRASP: operation complete.

These are the errors I get when compiling
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's a bit hard to say because the indentation is so screwed up, but I think the "Payment" method has no closing brace.

You might consider this an example of why proper indentation is a good thing :-)

By the way, it's common to use lowercase names for methods, to set them part from constructors. That's one of the few coding standards that's used just about everywhere.
[ September 14, 2008: Message edited by: Ulf Dittmer ]
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!