lambda syntax tutorial
Rémi Forax
forax at univ-mlv.fr
Thu Aug 5 07:37:05 PDT 2010
Le 05/08/2010 16:14, "Zdeněk Troníček" a écrit :
> Adding an overloaded method can break source compatibility even now:
>
> class A {
> static void m(int i, double d) { }
> //static void m(double d, int i) { }
> }
>
> class Main {
> public static void main(String[] args) {
> A.m(1, 2);
> }
> }
>
> Z.
>
You are right, but without method reference, my example was legal.
This trick was used in 1.4 to introduce StringBuffer.append(StringBuffer)
even if a method StringBuffer.append(Object) was already existing.
see http://www.itjungle.com/mgo/mgo072303-story01.html
Rémi
More information about the lambda-dev
mailing list