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.
Read moreHow do you create an interface class?
An interface is declared by using the interface keyword . It provides total abstraction; means all the methods in an interface are declared with the empty body, and all the fields are public, static and final by default. A class that implements an interface must implement all the methods declared in the interface.
Read more