I am trying to understand generics and interfaces and I came across this code:
Func<Integer, Integer> fDouble = new Func<Integer, Integer>()
{
public Integer apply(Integer x)
{
return x * x;
}
};
I understood that the method fDouble returns the double of the inputted integer, however, I cannot understand how there is a ; after the } and how the method is declared by
Func<Integer, Integer> fDouble = new Func<Integer, Integer>()
fDouble. Whoever wrote that should be forced to do 20 pushups, then rename it. :-)