Yes, you can define a class inside an interface . In general, if the methods of the interface use this class and if we are not using it anywhere else we will declare a class within an interface.
Can we create class of interface?
Yes, you can define a class inside an interface . In general, if the methods of the interface use this class and if we are not using it anywhere else we will declare a class within an interface.