Why the Scanner#nextInt method does not consume the last newline character of input in Java

Why it is not taking String input? Is this is issue with Scanner class sould i use bufferreader class

    ```int i = scan.nextInt();```
    ```double d = scan.nextDouble();```
    ```String in = scan.nextLine();```
    ```String s = scan.nextLine();```

    
    ```System.out.println("String: " + s);```
    ```System.out.println("Double: " + d);```
    ```System.out.println("Int: " + i);```

output:
String :
Double : 8.0
Int : 87