It's because nextInt() doesn't consume the newline character in the input stream. Try this:
import java.util.*;
public class Oldest {
public static void main(String[] args) {
Scanner stdin =...
Type: Posts; User: helloworld922
It's because nextInt() doesn't consume the newline character in the input stream. Try this:
import java.util.*;
public class Oldest {
public static void main(String[] args) {
Scanner stdin =...