Agoda Interview Question

Java: abstract vs interface

Interview Answer

Anonymous

Jan 9, 2018

both cannot be instantiated and must be extended however while abstract class may include fully implemented methods an interface cannot have implementations - only declarations. a class with at least one abstract method must be declared as abstract. interfaces do not use the abstract modifier as all method declarations are must be implemented by overriding class