![]() Because all Enum by default extendĪbstract base class , obviously they cannot extend anotherĬlass, because Java doesn’t support multiple inheritance forīecause of extending class, all enum gets methodsĬan we create instance of Enum outside of Enum itself? If Not, Why? ![]() This gives a lot ofįlexibility to use Enum as specialized implementation in some cases Can Enum extends class in Java? ![]() To class and interface, it can implement interface. Yes, Enum can implement interface in Java. An immutable class public final class Student 1) Can Enum implement interface in Java?
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |