aspose file tools
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
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply 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: 3796
    
    1

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Syntax error on token(s), misplaced construct(s)
 
Similar Threads
Homework Trouble: Not understood syntax error, Instance of a generic BST class
Java SE 6 validating Required data elements
Eclipse , syntax error on token(s)
Cannot Figure Out This Syntax Error
problem in System.out.println