/**
* Class to test what sort of communication between
* local classes and the enclosing method's local variables.
* This experiment does not explore access to instance/static
* variables and methods in the outer class.
* They behave like anonymous inner classes.
* @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;
class LIC1
{
public void amethod( )
{
int ifi = ofi;
}
};
LIC1 lic1 = new LIC1().amethod();
}
void oim()
{
int oi = 0;
final int ofi = 1;
class LIC2
{
public void amethod( )
{
int ifi = ofi;
}
};
LIC2 lic2 = new LIC2().amethod()
}
}