Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Syntax Error

 
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
Marshal
Pie
Posts: 24208
35
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