hi friends
i am new to java and started a week back
even in a simple program shown below
system.out prints twice i am using netbeans ide
it prints as bellows
press a key : a
press a key : press a key :
public class DoWhile { /** * @param args the command line arguments * @throws java.io.IOException */ public static void main(String[] args) throws java.io.IOException { char ch; do { System.out.print("press a key : "); ch = (char) System.in.read(); } while(ch != 'q'); } }
kindly help