Search code examples
javainterfacemultiple-inheritancejava-8diamond-problem

Virtual Extension Methods in upcoming Java 8 release


When I see code snippets like

  interface A {
      void a();
      void b() default { System.out.println("b"); };
      void c() final { System.out.println("c"); };
  }

I have one question. Haven't we already got enough sh*t in Java? Why one might need this?


Solution

  • I suggest you to look at this conference : http://medianetwork.oracle.com/media/show/16999

    This explain everything. The most interesting thing to do is to allow an interface to evolve without rewritting your whole codebase. This is key to allow a big codebase to evolve and not become more and more crippled.