I am trying to use a for loop instead of a while loop and am running into the message cannot find symbol -class bubble
This is set up pretty much like my while loop, so I do not understand the message "cannot find symbol -class bubble"
Here is my code
import greenfoot.*; // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)
/**
* A bit of empty space for bubbles to float in.
*
* @author Michael Kölling
* @version 1.0
*/
public class Space extends World
{
/**
* Create Space. Make it black.
*/
public Space()
{
super(900, 600, 1);
getBackground().setColor(Color.BLACK);
getBackground().fill();
setup();
}
private void setup()
{
Bubble bubble = new bubble();
int i = 0;
for( i=0;(i <+21); i++)
{
addObject(bubble=new bubble(),i*30,i*30);
}
}
}