QuesHub > final > can > interface > ASK DETAIL

Can we declare interface as final in Java?

Scarlett Lee | 2023-06-09 06:42:30 | page views:1155
I'll answer
Earn 20 gold coins for an accepted answer.20 Earn 20 gold coins for an accepted answer.
40more

Julian Anderson

Works at the International Fund for Agricultural Development, Lives in Rome, Italy.
A final method can't be overridden. That defies the purpose of having an interface if you cannot actually implement the method. All variables are implicitly public static and final in interfaces. Prior to Java 8, you can't create static methods in interfaces.May 20, 2012
2023-06-11 06:42:30

Liam Patel

QuesHub.com delivers expert answers and knowledge to you.
A final method can't be overridden. That defies the purpose of having an interface if you cannot actually implement the method. All variables are implicitly public static and final in interfaces. Prior to Java 8, you can't create static methods in interfaces.May 20, 2012
ask:3,asku:1,askr:137,askz:21,askd:152,RedisW:0askR:3,askD:0 mz:hit,askU:0,askT:0askA:4