GeeCON Prague 2014*
The moose likes Beginning Java and the fly likes Syntax error on token(s), misplaced construct(s) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Syntax error on token(s), misplaced construct(s) " Watch "Syntax error on token(s), misplaced construct(s) " New topic
Author

Syntax error on token(s), misplaced construct(s)

Sanjana Sharma
Greenhorn

Joined: Jan 08, 2011
Posts: 29


compiling the above code throws the following compilation error.

Syntax error on token(s), misplaced construct(s)
Matthew Brown
Bartender

Joined: Apr 06, 2010
Posts: 4397
    
    8

You've got two else clauses. The first should be else if.
Sanjana Sharma
Greenhorn

Joined: Jan 08, 2011
Posts: 29
Thanks
mike ryan
Ranch Hand

Joined: Aug 08, 2010
Posts: 210

Hi Sanjana,

You have two else statements. If you correct that your code will compile and run;)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Syntax error on token(s), misplaced construct(s)