I really don't know what is wrong, any help?
public class watershipgameworlod extends World
{
/**
* Constructor for objects of class watershipgameworlod.
*
*/
public watershipgameworlod()
{
// Create a new world with 600x400 cells with a cell size of 1x1 pixels.
super(600, 400, 1);
addObject (new ship(), 300, 200);
addObject (new Submarine(), 100, 50);
addObject(new crate(), 400, 350);
}
private void prepare
{
//add the ship
Ship ship = new ship();
addObject(ship, 124, 260);
//ask the user how many Submarines they want to leave
int Submarine = 0; //set up a local variable to store how many Submarines you want
String temp; //you need this as JOptionPane can only get string values
do{ //make sure they can only have up to 5 Submarines
temp = JOptionPane.showInputDialog(null,"How many lobsters do you want? maximum 5");
if (isNumber(temp))
{
lobsters = Integer.parseInt(temp);
if (Submarines < 1 || Submarines > 5)
{
JOptionPane.showMessageDialog(null,"Error:between 1 and 5 only");
}//end if
}
else{
}//end if
}while (Submarines <1 || Submarines > 5);
//add that number of Submarines
for (int i = 0;i < Submarines; i++){
addObject(new Submarines(), Greenfoot.getRandomNumber(530), Greenfoot.getRandomNumber(500));
}
//add 10 crate
for (int i = 0;i < 10; i++){
addObject(new crate(), Greenfoot.getRandomNumber(530), Greenfoot.getRandomNumber(500));
}
} //end of prepare
private boolean isNumber(String s)
{
try
{
Integer.parseInt(s);
return true;
}catch (NumberFormatException ex)
{
return false;
}
}
}

