I have created this program method:
import.javax.swing.JOptionPane;
public static void rabbits()
{
& & & & int count=2;
& & & while(count>0)
{
& & & & & & JOptionPane.showMessageDialog(null,"Rabbits have lots of fun");
& & & & & & JOptionPane.showMessageDialog(null,"Rabbits have lots of fun");
& & & & & & JOptionPane.showMessageDialog(null,"Rabbits have lots of fun");
& & & & & JOptionPane.showMessageDialog(null,"Rabbits have lots of fun");
& & & & & JOptionPane.showMessageDialog(null,"Rabbits have lots of fun");
}
}
I want to do this program in for loop help me please.