如何尽可能优化这个功能
public void r1(String st1, int[] ar1) {
String inox = "newsearch";
for (int j = 0; j < ar1.length; j++) {
if (st1.equals(inox) && ar1[j] * 2 > 20) {
Integer intx = new Integer(ar1[j]);
intx = intx * 2;
System.out.print(intx.toString());
}
}
}