| Author |
illegal start of expression??
|
Fazz
Greenhorn
Joined: Mar 16, 2006
Posts: 9
|
|
When attempting to compile the following code, i recieved the message, 'illegal start of expression', with the line in bold, highlighted. Any ideas what that would mean??? private void go() { String test = "Mary had a little lamb"; for(StringTokenizer token = new StringTokeizer(test); token.hasMoreTokens() { String word = token.nextToken(); System.out.println("Word = " + word); } }
|
 |
Ernest Friedman-Hill
author and iconoclast
Marshal
Joined: Jul 08, 2003
Posts: 24054
|
|
Hi, Welcome to JavaRanch! It generally means that there's a real error on a line before this. The most likely problem is a missing close-brace, so that this method declaration seems to appear inside the preceding method.
|
[Jess in Action][AskingGoodQuestions]
|
 |
 |
|
|
subject: illegal start of expression??
|
|
|