Bugs item #1469960, was opened at 2006-04-13 10:30
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=1469960&group_id=44253
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: Scanner infinite loop
Initial Comment:
The following program result in an infinite loop, where the System.in
windows keeps reappearing. At this point, there is no way to exit Dr Java
(except via Force Quit in Mac OS 10.4). Perhaps there is an undocumented
way to enter EOF?
import java.util.Scanner;
public class Test {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while (sc.hasNext()) {
String s = sc.next();
System.out.println(s);
}
}
}
goo...@gm...
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=438935&aid=1469960&group_id=44253
|