Neither is better. It depends on your lifestyle and your individual preferences.
Also, don't forget about adult pets! There are many very nice cats and dogs sitting on death row in shelters for no other reason than there aren't enough homes for them all. People tend to get pets on impulse without fully considering all that is involved in pet ownership, and then abandon them when they don't behave according to their expectations or they become an inconvenience.
I've had both cats and dogs. If you can't walk a dog, consider a cat. Cats are pretty low maintenance pets, but equally as companionable as dogs.