Czy możemy utworzyć obiekt interfejsu w Javie

// The answer is no

// Assume we have an interface called Foo stored in Foo.java
public interface Foo {
	public void method();
}

// Driver class called Driver stored in Driver.java
public class Driver {
	public static void main(String[] args) {
    	Foo foo = new Foo(); // Results in a compile-time error 
      	// Rest of code
    }
}
Wissam