Give an example of a ring $A$ such that $\dim(A) =0$ but $A$ is not a field.
One thing is sure, $A$ cannot be an integral domain.
Give an example of a ring $A$ such that $\dim(A) =0$ but $A$ is not a field.
One thing is sure, $A$ cannot be an integral domain.
let $k$ be a field. consider $k \times k$ (pointwise multiplication).
"Steps in Commutative Algebra" by "R. Y. Sharp" has:
8.39 LEMMA. Let $R$ be a commutative Artinian ring. Then every prime ideal of $R$ is maximal.
So every Artinian ring which is not a field, is an answer to your question.
For examples of Artinian rings see here and here. Also if you are familiar with localization, you can easily see that if $p$ is a minimal prime ideal of $R$, then $R_p$ is artinian.
Let $R$ be a Boolean ring other than $\mathbb{Z}/2\mathbb{Z}$.
Lemma The only integral domain that is Boolean is $\mathbb{Z}/2\mathbb{Z}$, for otherwise, if $R$ an integral domain but $R \neq Z/2Z$, we may take $a \neq 0, 1$. But $a \cdot (a-1) = a^2 - a = a - a = 0$ a contradiction.
Hence, Every prime ideal $P$ of $R$ is maximal, since $R/P$ is boolean and integral implies $R/P \simeq \mathbb{Z}/2\mathbb{Z}$ a field. Therefore, $dim R = 0$.