File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Else without an if Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Else without an if" Watch "Else without an if" New topic
Author

Else without an if

Lisa Beglaw
Ranch Hand

Joined: Jul 16, 2005
Posts: 65
I am getting the error ese without an if on the last line of my code...



I think I just have some {} missing or out of place but I can't figure out which, I need someone new to look at cause I am going blind.

Thanks
[ August 07, 2005: Message edited by: Lisa Beglaw ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35438
    
    9
Yes, you've got one too many "}" before your else.
An editor that shows matching braces can do wonders in cases like these...


Android appsImageJ pluginsJava web charts
Lisa Beglaw
Ranch Hand

Joined: Jul 16, 2005
Posts: 65
GOT IT!!! I love having this site here as a safety net, but I love it when I can figure it out for myself!
Lisa Beglaw
Ranch Hand

Joined: Jul 16, 2005
Posts: 65
Thanks Ulf...I had my return statement in the wrong spot too.

Correction, there are alot of mistake in that!
[ August 07, 2005: Message edited by: Lisa Beglaw ]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Else without an if
 
Similar Threads
To use break statements or not to use break statements, that is the question
I'm at the end of my rope...
Reading Head First Java - confused
Question about HashSet
'void' type not allowed here