You are viewing a single comment's thread. Return to all comments →
What is the reason that it occurs only when we take INT/FLOAT input and then STRING.
For Example,
int i = sc.nextInt(); String s = sc.nextLine();
It will keep key buffer.
But here,
int i = sc.nextInt(); double d = sc.nextDouble();
Here in above case no buffer is created.
Java Stdin and Stdout II
You are viewing a single comment's thread. Return to all comments →
What is the reason that it occurs only when we take INT/FLOAT input and then STRING.
For Example,
It will keep key buffer.
But here,
Here in above case no buffer is created.