For the code given below how do i create an instance of the LocalClass so that i can invoke the method lc() which belongs to the LocalLCass?
Source:self
Thank you in advance.
Srikanth Iyer.
code:
import java.io.*;
interface B {
String i ="3";void b();}
interface A extends B{ static String i="5"; void a();}
class Check implements A
{
public static void main(String args[])
{
String i ="1";
Check c = new Check();
c.b();
c.a();
System.out.println(i+" "+"main");
}
public void b(){System.out.println(i+" "+"bubu");}
public void a(){System.out.println(i+" "+"b");}
}
class C{
public void ca()
{
class LocalClass extends C{ String i = "2"; void lc() {System.out.println(i+" "+"lc");}}
}
}