Nov. 18th, 2008
первая жертва
Nov. 18th, 2008 03:22 pmProblem: you are given an
(lead developer from a certain company starting with 'y')
interface Function<X, Y> { Y apply(X x); }
, write a method that takes an instance of Y and returns a constant function always returning this instance of Y.public Function<X, Y> apply(Object<X> p) { Function<Y> y = new Function<Y>() { public <Y> apply(Object<X> p) { Object<Y> y = new Object<Y>(); return y; } } return y; }
(lead developer from a certain company starting with 'y')