When you do String fullName = inputScanner.next()
you only read till the next whitespace so obviously there is no whitespace in fullName
since it is only the first name.
If you want to read the whole line use String fullName = inputScanner.nextLine();