This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
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


Win a copy of Building Microservices this week in the Design forum!
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: 4541
    
    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;)
 
Have you checked out Aspose?
 
subject: Syntax error on token(s), misplaced construct(s)
 
jQuery in Action, 3rd edition