What is difference between interface and abstract class? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

What is difference between interface and abstract class?

20th Jul 2018, 5:42 PM
Maninder $ingh
Maninder $ingh - avatar
2 Answers
+ 4
Hello, Maninder Singh ! Please use the search feature on SoloLearn, I think this is a good opportunity. Also this will help prevent duplication of posts. You can also read the rules for "creating content" on SoloLearn. https://www.sololearn.com/Content-Creation-Guidelines Good luck in programming on SoloLearn! https://www.sololearn.com/Discuss/489391/?ref=app https://www.sololearn.com/Discuss/363907/?ref=app
20th Jul 2018, 5:46 PM
Alexander Sokolov
Alexander Sokolov - avatar
+ 1
Interfaces are rules (provides only method declarations and not the implementation). Interfaces give the idea what is to be done but not how it will be done. So implementation completely depends on developer by following the given rules (means given signature of methods). Abstract classes may contain abstract declarations, concrete implementations, or both. But interfaces cannot have concrete implementations. Abstract declarations are like rules to be followed and concrete implementations are like guidelines (you can use it as it is or you can ignore it by overriding and giving your own implementation to it). You can see in detail here:- http://crbtech.in/Java-Training/explain-difference-detween-interface-abstract-class/
21st Jul 2018, 6:21 AM
pranit patil
pranit patil - avatar