Virtual Extension Methods in upcoming Java 8 release

前端 未结 5 727
既然无缘
既然无缘 2020-12-31 10:23

When I see code snippets like

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


        
5条回答
  •  渐次进展
    2020-12-31 10:37

    I believe that "extension methods" concept is no more than just the last chance to hack/fix poorly designed APIs which have been exposed to "external world". Just syntactic sugar.

提交回复
热议问题