
//This code doesn't Works//
import java.lang.*;
import static java.lang.System.*;
class Outer
{
static Inner i;
static{
i=new Inner();
}
class Inner
{
void fun(){
out.println("Inner");
}
}
}
class Print
{
void fun(){
out.println("Print...");
}
}
class Trial
{
public static void main(String args[])
{
Outer.i.fun();
}
}
why this code doesn't compile,Please explain...
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.