Categories
Uncategorized

Inner class (CIA 1B)

class rectangle { static double length,breadth; rectangle() { length=4; breadth=5; } public static void display() { double ar; ar=length*length; System.out.println(“area of square:”+ar); }           class square               {               void disp()               {              double ar;              ar=length*breadth;              System.out.println(“area of Rectangle:”+ar);             }            }