42 The interface keyword indicates that you are declaring a traditional interface class in Java. The @interface keyword is used to declare a new annotation type. See docs.oracle tutorial on annotations for a description of the syntax. See the JLS if you really want to get into the details of what @interface means.
That having been said, an interface constraint on T should allow reference comparisons between T and any other reference type, since reference comparisons are allowed between any interface and almost any other reference type, and allowing comparisons even that case would pose no problem.
An interface is a good example of loose coupling (dynamic polymorphism/dynamic binding) An interface implements polymorphism and abstraction.It tells what to do but how to do is defined by the implementing class.
But Interface is a contract which tells its implantations to provide if it is not an abstract class. And the One important difference between a class and interface is that class inheritance will give relation between two common subclasses. Where as Interface implementation gives a relation between two uncommon classes.
An interface can indeed not be instantiated so doesn't need a constructor. What I wanted to define was a signature to a constructor. Exactly like an interface can define a signature of a certain method, the interface could define the signature of a constructor.
Just right-click "interface" in the editor and select Go To Definition. __interface is a non-standard keyword, well documented in MSDN. As you can tell, it provides a lot more guarantees than struct does.
I have the following interface in TypeScript: interface IX { a: string, b: any, c: AnotherType } I declare a variable of that type and I initialize all the properties let x: IX = { ...
Interface methods are meant to be implemented as instance methods. If you want replicate the methods of an static api to an interface, you can create a class that implement this interface, just delegating all calls to the real static api.