+ 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) ?

1st Sep 2017, 3:17 PM
Michael Vigato
Michael Vigato - avatar
4 Answers
+ 2
So if I was willing to modify myInterface.hello, I would not be able, because that's final. right?
1st Sep 2017, 3:47 PM
Michael Vigato
Michael Vigato - avatar
+ 2
Ok thank you guys, this has cleared up my mind ❀
1st Sep 2017, 3:55 PM
Michael Vigato
Michael Vigato - avatar