Linked Questions
23 questions linked to/from When should one use interfaces?
0 votes
1 answer
723 views
What's the point of Interfaces? [duplicate]
I'm having trouble understanding why I should use interfaces, and how I should integrate them into my current project. I use a lot of polymorphism already, and I usually see polymorphism and ...
1 vote
0 answers
524 views
Why I should use interface instead of directly declaring method inside of the class without interface [duplicate]
can you please explain why really i need use interface instead of directly declaring and implementing method inside of Class. Above i have two example. Class with interface and without. Thanks in ...
1 vote
1 answer
308 views
What is the benefit of using interface in PHP and where is the real use of it? [duplicate]
I have created an interface Animal and make function makeSound. Now I implements Animal in Cat and Dog class and echo something from makeSound function. Now I am confused why I need to create ...
2 votes
1 answer
109 views
Java interface types or how do you use interfaces? [duplicate]
It's a rather theoretical question, but what kind of interfaces does java have? For example, I know two of them: marker interfaces (e.g. Serializable, no methods defined, is similar to class-level ...
-1 votes
1 answer
104 views
Interface as a Type in java [duplicate]
I see people creating an instance of some class and assigning it to a reference variable of type interface that the class implements. interface A { void display(); } public class InterfaceObject ...
87 votes
11 answers
90k views
Why to use Interfaces, Multiple Inheritance vs Interfaces, Benefits of Interfaces?
I still have some confusion about this thing. What I have found till now is (Similar questions have already been asked here but I was having some other points.) Interface is collection of ONLY ...
23 votes
8 answers
15k views
What exactly is "interface based programming"?
I often hear/read about interfaced based programming but I am not exactly clear on what that really means. Is interfaced based programming an actual stand alone topic that actually has books written ...
10 votes
3 answers
10k views
When to use interfaces in Dart?
I was reading Dart's documentation and I was a little bit confused, maybe because I'm coming from Ruby, as to how to use interfaces. Of course, interfaces are not unique to Dart and there are quite a ...
6 votes
12 answers
5k views
What is the need of interfaces in C#? [duplicate]
Instead of writing abstract methods in interfaces, why not directly implement those methods in class?
9 votes
5 answers
30k views
Queue<Integer> q = new LinkedList<Integer>()
Here is an answer to "How do I instantiate a Queue object in java?", Queue is an interface. You can't instantiate an interface directly except via an anonymous inner class. Typically this ...
0 votes
2 answers
1k views
Why do we need interfaces if it only declares the method signature?
All the methods declared in interfaces are abstract and we have to re-write the method with signature and body in the class that implements the interface. So what's the point of using the interface?
1 vote
1 answer
2k views
Clean Architecture Android
I'm trying to learn about clean architecture. I've a question.According to this article Making a network request is one of the most common tasks an Android app might perform. The News app needs to ...
3 votes
1 answer
1k views
Can a class inherit methods (or subclass) from a different file? Is this "Pythonic"?
In trying to build a scientific Python package, I'm aiming to separate key functionality into different .py files for clarity. Specifically, it seems logical to me to split complicated numerical ...
0 votes
6 answers
309 views
About interfaces [duplicate]
Possible Duplicate: Interfaces: Why cant I seem to grasp them? What is the purpose of interfaces in C#? How would they enable extendable,modular design in c#,Java? As far as my experience with ...
1 vote
2 answers
915 views
Abstract class 'n Interface, specifically in PHP
This question is in continuation to my previous post located here. Since there is no way to post code sample again without editing your original post, I am starting a new post. And also, this contains ...