Not necessarily. Sensitivity has many possible causes, and a cavity is just one of them. The only way to know for sure is a dental examination with X-rays.