hi Pieter,
if you have:
then if you type say 1, followed by an enter, then
java reads that 1, but leaves a 'newline' in the scanners buffer. So the moment you do:
then that pending newline is appointed to the variable 'name', and java goes on.
You can see this effect in lines 12-17.
A simple remedy is to put 'scanner.nextLine();' between lines 12 and 13, that will swallow that newline.
People here will show you some handy input-routines that will make life easy on you.