I just installed Eclipse and am wondering if the following is normal. When I run a java program in Eclipse it cannot "read the keyboard" but it can print variable values okay. My program works fine if instead of using the Eclipse IDE I instead run in a cmd window in XP.
So it is the while loop at the bottom of my code that is ignored by Eclipse. I'm a newbie and am wondering if this is normal? Thanks. Maybe I must run it a special way?
import java.text.DateFormat; import java.util.*; public class eliz9 { public static void main(String[] args) { int purp =2222; System.out.println(purp); Scanner keyboard = new Scanner(System.in); String[] four = {"Tell me more about"}; System.out.println( System.currentTimeMillis() ); double a = System.currentTimeMillis(); int z=0; while ( z < 999922227) { z++; } System.out.println( System.currentTimeMillis() ); double b = System.currentTimeMillis(); double c= b-a; System.out.println( c); z = 5; while ( z < 7) { Scanner myScanner = new Scanner(System.in); int xinputNumber = myScanner.nextInt(); z= xinputNumber; } // TODO Auto-generated method stub }