why classes in some java programs are implements an empty interface in java?
What is the usage?
interface E{
}
public class A implements E{
public static void main(String[] args) {
System.out.println("Something...");
}
}
CodePudding user response:
Basically it is used to logically divide the code and a good way to categorize code. It is more useful for developing API and in frameworks like Spring.
CodePudding user response:
Also known as a Marker Interface: