Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Syntax Error  RSS feed

 
Rick Portugal
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Line 5 produces a 'Syntax error on token "(","identifier" expected'
What is the problem?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Line 5 is a statement, and statements have to be in code blocks. The most common form of code block is a method. You probably mean to do something like

Here I've put all your code into the method "main".
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!