Collecting the comments, given a commutative ring $R$ with unity, $(0)$ is a prime ideal if and only if the ring $R$ is actually an integral domain. This given that $$ \text{Then an ideal }p\text{ is prime iff }R/p\text{ is an integral domain.} $$ In your case, $(0)$ is prime iff $R/(0)\cong R$ is an integral domain. But despite this, your final conclusion is still true since every maximal ideal is prime, if you suppose that your ring has two maximal ideals (at least) then you have two prime ideals which is a contradiction, therefore your ring is local