java scanner nextline in loop