Let $A$ be an integral domain. Show that $\dim(A)=0 \iff A$ is a field.
The backward implication is trivial.
For the forward implication, if we can show that $1 \in <a>$, where $a(\neq 0) \in A$. Then, we are done. However, I don't know how to show it.
Any suggestions are appreciated.
This means $(0)$ is the only prime ideal, since $A$ is a domain. As the set of non-invertible elements is the union of all prime/maximal ideals, it implies all non-zero elements are invertible.