|
-
September 29th, 1999, 05:24 AM
#1
Memeber Class
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();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|