Top "Interface" questions

An interface refers to the designated point of interaction with a component.

Is there more to an interface than having the correct methods

So lets say I have this interface: public interface IBox { public void setSize(int size); public int getSize(); public int …

java oop language-features interface
When do I have to use interfaces instead of abstract classes?

I was wondering when I should use interfaces. Lets think about the following: public abstract class Vehicle { abstract float getSpeed(); } …

java oop inheritance interface abstract-class
Implementing two interfaces in a class with same method. Which interface method is overridden?

Two interfaces with same method names and signatures. But implemented by a single class then how the compiler will identify …

java interface overriding
Interface vs Base class

When should I use an interface and when should I use a base class? Should it always be an interface …

oop interface language-agnostic base-class static-typing
Interfaces vs. abstract classes

In C#, when should you use interfaces and when should you use abstract classes? What can be the deciding factor?

c# inheritance interface abstract-class
Why can't C# interfaces contain fields?

For example, suppose I want an ICar interface and that all implementations will contain the field Year. Does this mean …

c# interface
Can a normal Class implement multiple interfaces?

I know that multiple inheritances between Interfaces is possible, e.g.: public interface C extends A,B {...} //Where A, B …

java interface multiple-inheritance
C# Interfaces. Implicit implementation versus Explicit implementation

What are the differences in implementing interfaces implicitly and explicitly in C#? When should you use implicit and when should …

c# .net interface
Why do I get an error instantiating an interface?

I have a class and an interface, and when I try to instantiate the interface, I get an error: Cannot …

c# oop class interface instantiation
What is the definition of "interface" in object oriented programming

Ok, a friend of mine go back and forth on what "interface" means in programming. What is the best description …

oop interface definition