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 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!