What is the difference between an interface and an abstract class in Java?
A. An interface can have only abstract methods, while an abstract class can have both abstract and concrete methods.
B. An interface can have only static methods, while an abstract class can have both static and non-static methods.
C. An interface can have only final variables, while an abstract class can have both final and non-final variables.
D. An interface can be inherited by multiple classes, while an abstract class can be inherited by only one class.
Answer:A
What is the difference between an interface and an abstract class in Java?
A. An interface can have only abstract methods, while an abstract class can have both abstract and concrete methods. B. An interface can have only static methods, while an abstract class can have both static and non-static methods. C. An interface can have only final variables, while an abstract class can have both final and non-final variables. D. An interface can be inherited by multiple classes, while an abstract class can be inherited by only one class.