Many will disagree, but I would suggest getting a 9mm over the .40. I've seen many a new shooter get a .40 (and no instruction) end up developing horrible flinching issues. Get the 9mm, get some training, doesn't have to be ninja academy stuff, but a local class at the range etc. is a good start. All your major service calibers (9mm, .40, .45 etc.) perform pretty darn close to one another when using modern jacked hollow points of reputable manufacture.