Explain the difference between abstract classes and interfaces in Java?
Interface | Abstract class | |
---|---|---|
1. | Can only have abstract methods | Can have abstract, non-abstract methods |
2. | Variables are by default final. | May contain non-final variables. |
3. | Only has static and final variables | Can have non-final, final, non-static and static variables |
BY Best Interview Question ON 13 Jan 2019