From: SourceForge.net <no...@so...> - 2004-06-15 07:16:12
|
Bugs item #973027, was opened at 2004-06-15 15:16 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=973027&group_id=44253 Category: Compiler integration Group: Serious Status: Open Resolution: None Priority: 5 Submitted By: Nor Jaidi Tuah (norjaidi) Assigned to: Nobody/Anonymous (nobody) Summary: Iterator in "for" causes "out of sync" Initial Comment: DrJava: 20040331-0037 Compiler: javac 1.5.0 System: Windows XP The following compiles (compiler output message: "Last compilation completed successfully"), but produces no class file. When run from the interaction panel, the message "... out of sync ..." is written. // start offending source import java.util.*; public class X { public static void main(String[] xx) { Scanner sc = Scanner.create("hello ini apa"); for (String x : sc ) { System.out.println(x); } } } // end offending source Changing the for loop to for (String x : new String[]{"etc", "etc"}) works! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=438935&aid=973027&group_id=44253 |