+ 3
Trivial question about interfaces
Now, I'm aware that, by default, interfaces are final and static. static because they cannot be instantiated, and final because I can only declare constant variables within them. My questions are: - Do I need to explicitly declare "public final static interface", or I just declare "public interface" and it is set final and static implicitly? -If I do need to declare it explicitly, do I need to do that only if I want to have constant values within it, or in any case (e.g. interface with only functions) ?
4 Réponses
+ 2
So if I was willing to modify myInterface.hello, I would not be able, because that's final. right?
+ 2
Ok thank you guys, this has cleared up my mind ❤️