Question: I have an abstract class say **CTest** which contains only the abstract method f1() and nothing else. Similiarly, i have a Interface **ITest** with the only method f1(). Here both the CTest abstract class and ITest interface does the same thing. 

**The one difference is that**, the Interface provides the flexibility that it can be implemented in any classes which already derived from other class but abstract classes cannot. 

Apart from the above difference, What is the actual difference between these two? and which one is efficient here(CTest or ITest)? When i should use what? Any specific scenario's in OO Design and any general suggessions on this are helpful

Answer: 
In `Java` prefer `Interfaces` to `Abstract Classes`. Refer Item 18 in **Effective Java**

![enter image description here](https://i.stack.imgur.com/pPyV1.jpg)

**Main Points** :

* Existing classes can be retroffited to implement a new interface.
* Interfaces are ideal for defining mixins.
* Interfaces allow the construction of nonheirarchical type frameworks.
* Interfaces enable safe, powerful functionality enhancements.
In this case, and assuming that your Abstract Class will only contain abstract methods, you should, in my opinion, go with the Interface. Abstract classes with abstract methods and interfaces serve the same purpose, however, you can extend only one class but implement as many as you want, thus making your code less prone to significant changes should you decide the inherit some functionality from some other class.

Regarding your question: *But What is the actual difference between these two? and which one is efficient here(CTest or ITest)? When i should use what? Any specific scenario's in OO Design and any general suggessions on this are helpful*

Interfaces are similar to contracts, when a class implements an interface, it guarantees an implementation. This is usually helpful when someone wants to provide functionality but does not want to reveal internal code, so the developer will just throw out the interface so that you can make your calls without knowing how is each method implemented. You can obviously implement as many interfaces as you like.

Abstract classes allow you to create a class which has certain behaviours which are specified and some others which are left to be implemented in the future. Unlike interfaces however, each class can only extend one class, so you should extend classes with caution from this point of view. Abstract classes also allow you to inject behaviour to one class and have it automatically spread through its child classes. This *usually* makes certain sections of development/maintenance easier.