I was reading the API for Java because I had a question on the difference between .nextLine() and .nextDouble(). In the API, it says this for
nextDouble()
only reads the next 4 bytes from the input stream which make up the double and does not advance to the next line, whereas nextLine() does. Also i think you need to understand that a new line is designated by the string '\n', and obviously a number will not contain a linebreak, so 'nextDouble()' will not 'advance' to the next line.
EDIT: Razvan is right