/**
* Class to test what sort of communication between
* anonymous inner classes and the enclosing
* method's local variables.
* This experiment does not explore access to instance/static
* variables and methods in the outer class.
* @author Roedy Green
*/
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class Outer
{
static void osm()
{
int oi = 0;
final int ofi = 1;
ActionListener listener = new ActionListener()
{
public void actionPerformed( ActionEvent e )
{
int ifi = ofi;
}
};
}
void oim()
{
int oi = 0;
final int ofi = 1;
ActionListener listener = new ActionListener()
{
public void actionPerformed( ActionEvent e )
{
int ifi = ofi;
}
};
}
}