📌  相关文章
📜  私有静态 void calcola(int i , 函数<integer , integer>fn){ int r = 0 ; for (int j = i ; j&gt;0 ; j--) r = fn.apply(r); System.out.println(r); } calcola (9 , (p) -&gt; { return p + 1;}); - 无论代码示例

📅  最后修改于: 2022-03-11 14:55:43.038000             🧑  作者: Mango

代码示例1
private static void calcola(int i , functionfn){
  int r = 0 ;
  for (int j = i ; j>0 ; j--) r = fn.apply(r);
  System.out.println(r);
}
calcola (9 , (p) -> {
  return p + 1;});