File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Methods" Watch "Methods" New topic
Author

Methods

Andrew Albers
Greenhorn

Joined: Feb 19, 2009
Posts: 10
Having trouble on figuring out why line 15 says illegal start of expression.






Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18117
    
  39

Having trouble on figuring out why line 15 says illegal start of expression.


The Java compiler is not expecting a method definition, within another method. Interestingly, this is not a case of mis-matched parens -- it looks like from the indents that you intended to do that (to define a method within a method).

Question is why?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Andrew Albers
Greenhorn

Joined: Feb 19, 2009
Posts: 10
....wow cant believe i didnt see that. thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Methods
 
Similar Threads
Problem looping back to beginning
What is wrong with this code?
Java Help: NullPointerException
Craps Game Code
Having problem compiling this answer