• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

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: 42975
76
  • 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: 42975
76
  • 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 ]
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!