The below program demonstrates how to clone an object. In the below program x1,x2 are two objects of class TestClone1 which implements cloneable.The x1 object is clone and assigned to x2 object. Run It Now!
The below program demonstrates how to create a static inner class and access it. The below program has class LifePolicy which defines a Static Inner class LifeBenefit which extends class Benefit. Run It Now!
The below program demonstrates how to create non-static inner class in java. In the below program, class LifeBenefit is a innerclass to class LifePolicy . Run It Now!
The below program demonstrates how to create nested inner class in java. In the below example , Class Inner is defined within Class Outer and can access Class Outer's datafield. Run It Now!