Passing Function As An Argument In Java