Explain the difference between abstract class and interface in Java?
Abstract Class | Interface | |
---|---|---|
1. | Can have members, constants, defined methods and method stubs | Can only have methods stubs and constants |
2. | Methods and members can be defined with any visibility | Methods must be defined as public |
3. | May contain non-final variables. | Variables declared are by default final |
BY Best Interview Question ON 13 Jan 2019