1

我想使用BCEL在我的方法中的特定 if_instruction 之前添加/插入一些 if_instruction。

这是我的方法:

public void printMax(int x , int y){
  int max=x;
  //////here is my desire position//////////
  if(y>x)
    max=y;
  System.out.println(max);
}
4

1 回答 1

0

对我来说if(x<y != y>x)是一样的,if(false)所以它不会成功;所以也许你应该使用IF_ACMPNE,但我不知道 BCEL ...

于 2013-12-20T16:37:12.540 回答