Advice Needed: When to Use Abstract Classes and When Interfaces?

Posted by Soumyar-Tripathy@reddit | learnprogramming | View on Reddit | 2 comments

I'm a student currently in my third semester, focusing a lot on Java in my studies. I'm aware of the syntax guidelines that abstract classes may include instance variables and constructors whereas interfaces have purely abstract implementations. But, whenever I start working on designing a small program, I find myself stuck between deciding whether to choose an interface or an abstract class. Is there any particular rule or principle that guides your approach here?