INTERFACE IN JAVA | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

INTERFACE IN JAVA

Do we need to describe a variable as static in interface or it is static by default?

18th Jun 2018, 3:54 PM
harshit
harshit - avatar
1 Answer
+ 7
Well, you can't instantiate an interface directly, so all variables are static and final by default.
18th Jun 2018, 4:35 PM
Tashi N
Tashi N - avatar