We use cookies to collect and analyze information on site performance and usage,
to provide social media features and to enhance and customize content and advertisements.
public class TestIt {
public static void main(String[] args) {
Outer outer = new Outer();
outer.new Inner().hello();
/*
output :
Hello from Inner()
*/
}
}
class Outer {
public class Inner {
public void hello(){
System.out.println("Hello from Inner()");
}
}
}