mirror of
https://github.com/Snailclimb/JavaGuide
synced 2025-06-16 18:10:13 +08:00
commit
bb4630cf4c
@ -135,17 +135,21 @@ public class Main {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean checkStrs(String[] strs) {
|
private static boolean chechStrs(String[] strs) {
|
||||||
if (strs != null) {
|
boolean flag = false;
|
||||||
// 遍历strs检查元素值
|
if (strs != null) {
|
||||||
for (int i = 0; i < strs.length; i++) {
|
// 遍历strs检查元素值
|
||||||
if (strs[i] == null || strs[i].length() == 0) {
|
for (int i = 0; i < strs.length; i++) {
|
||||||
return false;
|
if (strs[i] != null && strs[i].length() != 0) {
|
||||||
}
|
flag = true;
|
||||||
}
|
} else {
|
||||||
}
|
flag = false;
|
||||||
return true;
|
break;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
|
|
||||||
// 测试
|
// 测试
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user