Extract Method need-to-know
Author
Zhou Renjian
Create@
2004-12-09 16:26
public class TestRefactor {
public static void main(String[] args) {
int i = 0;
int j = 234;
i++;
j++;
int k = 23 + i;
System.out.println(k);
System.out.println(j);
}
}
When selecting the following section and trying to Extract Method in Eclipse JDT, it will popup dialog to tell you that you can not extract method, as "Ambigous return value: selected block contains more than one assignment to local variable.
i++;
j++;
int k = 23 + i;
...