/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl, C#, OCaml, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog. Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ class Outer{ int a,b; Outer(int x, int y){ a=x; b=y; } int area() { return a*b; } class Inner{ int c; Inner(int x){ c=x; } int voulme() { return area()*c; } } } public class Main { public static void main(String[] args) { Outer o1 = new Outer(10,20); Outer o2 = new Outer(30,40); Outer.Inner i1; i1= o1.new Inner(40); System.out.println(i1.voulme()); i1= o2.new Inner(40); System.out.println(i1.voulme()); } }