Can interface be declared as static in Java?
I'll answer
Earn 20 gold coins for an accepted answer.20
Earn 20 gold coins for an accepted answer.
40more
40more
Studied at Yale University, Lives in New Haven, CT
Java 8 Had changed the world you can have static methods in interface but it forces you to provide implementation for that. If a member of a class is declared as static, it can be used with its class name which is confined to that class, without creating an object.Aug 22, 2008
2023-06-16 06:42:28
评论(499)
Helpful(122)
Helpful
Helpful(2)

Charlotte Allen
QuesHub.com delivers expert answers and knowledge to you.
Java 8 Had changed the world you can have static methods in interface but it forces you to provide implementation for that. If a member of a class is declared as static, it can be used with its class name which is confined to that class, without creating an object.Aug 22, 2008