Top "Interface" questions

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

How does interfaces with construct signatures work?

I am having some trouble working out how defining constructors in interfaces work. I might be totally misunderstanding something. But …

typescript constructor interface
Checking if an instance's class implements an interface?

Given a class instance, is it possible to determine if it implements a particular interface? As far as I know, …

php interface oop
How to Implement IComparable interface?

I am populating an array with instances of a class: BankAccount[] a; . . . a = new BankAccount[] { new BankAccount("George Smith", 500m), …

c# interface icomparable
Can we use static method in an abstract class?

In Java Programming, Can we call a static method of an abstract class? Yes I know we can't use static …

java interface static abstract
What is the use of interface constants?

I am learning Java and just found that the Interface can have fields, which are public static and final. I …

java interface constants
Abstract class vs Interface in Java

I was asked a question, I wanted to get my answer reviewed here. Q: In which scenario it is more …

java design-patterns interface abstract-class
How to add a delegate to an interface C#

I need to have some delegates in my class. I'd like to use the interface to "remind" me to set …

c# interface delegates
Passing function as a parameter in java

I'm getting familiar with Android framework and Java and wanted to create a general "NetworkHelper" class which would handle most …

java android function interface parameters
Optional Methods in Java Interface

From my understanding if you implement an interface in java, the methods specified in that interface have to be used …

java methods interface
What's the difference between HashSet and Set?

Saw the code snippet like Set<Record> instances = new HashSet<Record>(); I am wondering if Hashset …

java interface set