Give an example of a ring $A$ such that $\dim(A) =0$ but $A$ is not a field. 
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 $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$.
