I am new to java 8 and trying this. i have an interface
public interface CurrencyRateDao{
Double getCurrencyRate(String srcCur,String tarCur, int month);
}
Accessing using it this way :
CurrencyRateDao currencyRateDao = new CurrencyRateDaoImpl();
Double rate = ('USD','INR',1) -> currencyRateDao::getCurrencyRate;
Giving an error:
target type of this expression must be a functional interface.
Please suggest what is wrong with above code