To show that either $R$ is a field or $R$ is a finite ring with prime number of elements and $ab = 0$ for all $a,b \in R$. Let $R$ be a commutative ring such that $R$ has no nontrivial ideal. Then show that either R is a field or R is a finite ring with prime number of elements and $ab = 0$ for all $a,b \in R$.
I am facing difficulty in proving the above!!
 A: (My version, since I have already gone to so much trouble with steps in comments.)
Actually, there is also the possibility that the ring has one element, and this is apparently not incorporated into the statement.  Assume from now on it is not the ring with one element.
The set $R^2=\{ab\mid a,b\in R\}$ is either zero, or it is not. $^\ast$
Case 1: $R^2= \{0\}$
Every subgroup of $(R,+)$ is an ideal of $R$. By the hypothesis of simplicity on $R$, $(R,+)$ is a simple, Abelian group, which of course from elementary group theory we know to be of prime order.
Case 2: $R^2\neq \{0\}$
There exists an $a,b\in R$ such that $ab\neq 0$, so that $aR=\{ar\mid r\in R\}$ is an ideal of $R$ that must be all of $R$. Now, the annihilator of $a$ (by which I mean $\{x\in R\mid ax=0\}$) is an ideal of $R$, which by our current assumption is $\{0\}$, so that $a$ is cancellable in $R$. 
Furthermore, there exists $b$ such that $ab=a$. We contend that $b$ is the identity of the ring. If $c$ is any other element of $R$, then from $ac=acb$, we conclude that $c=cb$, and so $b$ really is the identity.
Now knowing that $R$ is a simple ring with identity, it is elementary that for nonzero $a$, $aR=R$ implies that there exists $a'$ such that $aa'=1$, and therefore $R$ is a field.

$^\ast$ Purposefully not talking about the ideal product of $R$ with itself (which is defined differently.) I really mean the set of pairwise products.
A: Correct statement:

If $R$ is a commutative ring having only the ideals $\{0\}$ and $R$, then exactly one of the following conditions holds
  
  
*
  
*$R$ is a field
  
*$R$ is a finite zero ring (that is, for all $a,b\in R$, $ab=0$) with a prime number of elements
  
*$R$ is the trivial ring $\{0\}$.
  

The assumption that $R$ is commutative can be removed, if we substitute the assumption on ideals to be “having only the right ideals $\{0\}$ and $R$”. Of course condition 1. becomes “$R$ is a division ring”.
Suppose $R\ne\{0\}$.
Given $a\in R$, we either have $aR=R$ or $aR=\{0\}$. Let $J=\{a\in R:aR=\{0\}\}$. It is easy to prove that $J$ is a right ideal of $R$, so either $J=\{0\}$ or $J=R$.
In the case $J=R$, we have $R^2=\{0\}$; therefore $R$ is a zero ring, so any of its additive subgroups is an ideal; since there are no nontrivial ideals, $R$ must be a simple abelian group, hence finite with a prime number of elements.
We remain with the case $J=\{0\}$. This means that, for every $a\in R$, $a\ne0$, we have $aR=R$.
Given $a\ne0$, we have that $\operatorname{rann}(a)=\{x\in R:ax=0\}$ is either $\{0\}$ or $R$; but since $J=\{0\}$, we can only be in the first case. So every nonzero element is left cancellable: $ax=ay$ and $a\ne0$ implies $x=y$. Fix $z\ne0$; since $zR=R$, there is $e\in R$ with $ze=z$. If $a\in R$, we have $zea=za$ and so $ea=a$, by left cancellation.
Therefore $e$ is a left identity for $R$. For $a\in R$ we have
$$
(ae-a)z=aez-az=az-az=0
$$
so $ae-a=0$. Hence $e$ is also a right identity.
Proving now that $R$ is a division ring is easy.
A: Hint: for any (commutative) ring, we can consider the ideal generated by $a \in R$, we can define simply as
$$
\langle a \rangle = \{ra:r \in R\}
$$
If $\langle a \rangle$ is always trivial, what can you conclude?

Suppose that for some element $a \in R$ we have $\langle a \rangle = R$.  Then $a$ is a unit and therefore $\exists 1 \in R$.  Thus, $\forall b \in R$, $b \in \langle b \rangle$.
Thus, $\langle b \rangle = \{0\} \implies b = 0$. Thus, $b \neq 0 \implies \langle b \rangle = R$. Conclude that $R$ is a field.
Suppose otherwise.  The desired conclusion regarding the product is immediate, but it remains to be shown that there is a prime number of elements.  In fact, it's not clear to me that this should be the case.
In fact, here is a counterexample: take $R = \{0,1,2,3\}$ under the product $\forall a,b \in R:ab = 0$.  It seems to me that $R$ is indeed a commutative ring with the desired property.
A: Let $R$ be our ring with desired properties . As $R$ is an ideal of $R$ we can consider the ideal $R^2:=R.R$ ( all finite sums of the form $\sum _ia_ib_i , a_i , b_i \in R$ ) . By hypothesis , $R^2= 0$ or $R$ ( by $0$ here I mean the zero ideal ) ; if $R^2=0$ then $ab=0 , \forall a,b \in R$ , then every subgroup of $(R,+)$ is an ideal of $R$ ( why ?) and since $R$ has no non-trivial ideal , so $(R,+)$ has no non-trivial subgroup , so then by a  well-known result in group theory $(R,+)$ is a cyclic group with prime number of elements . Now for the other case , if $R^2 \ne 0$ . If it were the case that $ab= 0 , \forall a,b \in R$ , then $R^2=0$ (because its elements are all finite sums of the form $\sum_i a_i b_i$ ) no ! , so $\exists a,b \in R$ such that $ab \ne 0$ , so then $aR \ne 0$ , but $aR$ is an ideal ( not the ideal generated by $a$ though , still an ideal it is ) so by hypothesis $aR=R$ , so then $\exists e_0 \in R : ae_0=a$ , then consider any $r \in R=aR$ , then $\exists x_r \in R : r=ax_r$ , then $re_0=ax_re_0=x_rae_0=x_ra=ax_r=r$ , so $e_0$ is a ( and "the " ) unity of $R$ , so we have established that $R$ is a commutative ring with more than one element ( as $R^2 \ne 0$) and with unity with only trivial ideals thus $R$ must be a field 
