Top "Interface" questions

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

Why can't I define a static method in a Java interface?

EDIT: As of Java 8, static methods are now allowed in interfaces. Here's the example: public interface IXMLizable<T> { …

java interface static-methods
When to use an interface instead of an abstract class and vice versa?

This may be a generic OOP question. I wanted to do a generic comparison between an interface and an abstract …

oop inheritance interface abstract-class
Interface defining a constructor signature?

It's weird that this is the first time I've bumped into this problem, but: How do you define a constructor …

c# interface constructor
Interface type check with Typescript

This question is the direct analogon to Class type check with TypeScript I need to find out at runtime if …

javascript typescript interface
The difference between the Runnable and Callable interfaces in Java

What is the difference between using the Runnable and Callable interfaces when designing a concurrent thread in Java, why would …

java multithreading interface runnable callable
Implementing multiple interfaces with Java - is there a way to delegate?

I need to create a base class that implements several interfaces with lots of methods, example below. Is there an …

java interface delegation
How to determine if a type implements an interface with C# reflection

Does reflection in C# offer a way to determine if some given System.Type type models some interface? public interface …

c# reflection interface
Test if object implements interface

What is the simplest way of testing if an object implements a given interface in C#? (Answer to this question …

c# reflection interface
Interface naming in Java

Most OO languages prefix their interface names with a capital I, why does Java not do this? What was the …

java interface naming-conventions
Abstract class in Java

What is an "abstract class" in Java?

java oop interface abstract-class