2 ms·
Lambdas are in JDK 8 while Android supports JDK 6. This adds support for some of the features of JDK 7. That said, you could backport Lambda to JDK 6...
by spullara 14y ago
Lambdas are in JDK 8 while Android supports JDK 6. This adds support for some of the features of JDK 7. That said, you could backport Lambda to JDK 6...
- yareally 14y agoI'm sure they can be. I'm just at a dead end for the evening and way past the time I should be programming (I was the submitter/author of the OP), thanks though for the encouragement :) I was just going off the educated guess (without digging through the jdk8 source) that lambdas, like most other syntax features on Java, are just syntactical sugar that does not modify the underlying bytecode since jdk6 and so does not require significant code changes to get it working. Though of course I could be wrong, but I'll deal with that later on in the week.
- spullara 14y agoJDK 8 implements lambda using features in JDK 7 like Invokedynamic. However, they could be implemented as syntactic sugar on top of anonymous inner classes — they just wouldn't be as efficient.