62,614
社区成员
发帖
与我相关
我的任务
分享
public static void test(String str, int a) {
int b[] = {10,20,30,40,50,60,70};
if (str != null && str != "") {
if (str.equals(">")) {
int i = 0;
for (int d : b) {
if (d > a) {
System.out.println(d);
}
}
}
}
}
public static void main(String[] args) {
test(">", 40);
}