You can create a reference to an interface - you just cannot instantiate it. Let's say for example you have a interface A
public interface A { public void someMethod(); }
Now you have another class that implements this interface
public class B implements A { public void someMethod() { // do something } public void someOtherMethod() { // do something else } }
Now you can have something like
A a = new B();
While a reference type A it actually implements the method as defined in B. The object type is B. The reference type A indicates that it has only access to those methods in B that are specified by A and nothing else (in this case, it has access to someMethod() and not someOtherMethod()).
bis a reference to an object which must be an instance of class which implementsLinkb = new SubclassOfLink(). If you have no subclasses ofLinkthen you probably had no need to declare the variable.