I have written following code. JDK is giving some error message. I am unable to correct it.
Help me.

Code is

import java.lang.* ;


public class Sample2
{

public static void main(String[] args)
{
f1();
}
class a1 { };

static void f1()
{
a1 x1;
x1 = new a1();
}

}

Compiler Error :
No enclosing instance of class Sample2 is in scope; an explicit
one must be provided when creating inner class Sample2. a1, as in "outer. new I nner()" or "outer. super()".
x1 = new a1();