Are compiled Java 8 lambda expressions backwards compatible with earlier versions of the Java runtime?

后端 未结 4 1261
囚心锁ツ
囚心锁ツ 2020-12-16 15:45

In order to reduce the clutter caused by numerous instantiations of anonymous types, I\'m exploring the possibility of leveraging Java 8 lambdas.

One important cons

4条回答
  •  天命终不由人
    2020-12-16 16:23

    I dont believe so - the bytecode version is different (52 i think) and lambda uses invokedynamic and not get translated into anonymous classes..

提交回复
热议问题