Hello,
I seem to be having trouble running the new enhanced loops.
here is the set-up:
---------------------------------------
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode)
JAVA_HOME = C:\Program Files\Java\jdk1.5.0
PATH = C:\Perl\bin\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Java\jdk1.5.0\bin
WinXP Pro
-----------------------------------------
Code I am trying to run:
------------------------------------
public class JavaFive {
public static void main(String[] args) {
String[] A = new String[] {"tim","buck","too","zoo","joo"};
--line 18---> for (String s : A){
System.out.println(s);
}
}
}
-------------------------------------
Error = Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Syntax error on token(s), misplaced construct(s)
Syntax error on token ")", : expected
at org.redrum.tests.JavaFive.main(JavaFive.java:18)
anyone now whats up??


Reply With Quote


Bookmarks