Think about what static means - "not related to a particular instance". So, as you point out, a static
field of class Foo
is a field that does not belong to any Foo
instance, but rather belongs to the Foo
class itself.
Now think about what an interface is - it's a contract, a list of methods that classes which implement it promise to provide. Another way of thinking about this is that an interface is a set of methods that is "not related to a particular class" - any class can implement it, as long as it provides those methods.
So, if an interface is not related to any particular class, clearly one could not be related to an instance of a class - right?
*Note, as @Owlstead points out, there are ways of defining interfaces within classes. But, for the purposes of wrapping your head around what an interface is (which seems to be what you're working on), I would ignore those possibilities for now as they distract from and possibly obscure the purpose of interfaces in general.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…