1.javaԴ?源码ssm健康管理系统源码?smail
javaԴ??smail
多了 一个 {
public class Programme1 {
char[] cNum = { '1', '2', '3', '4', '5', '6', '7', '8', '9', '0' };
char[] cStr = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y',
'z' };
int[] iMonth = { , , , , , , , , , , , };
String[] sMail = { "@", "." };
public boolean isMail(String sPara) {
for (int i = 0; i < sMail.length; i++) {
if (sPara.indexOf(sMail[i]) == -1)
return false;
}
return true;
}
public boolean isString(String sPara) {
int iPLength = sPara.length();
for (int i = 0; i < iPLength; i++) {
char cTemp = sPara.charAt(i);
boolean bTemp = false;
for (int j = 0; j < cStr.length; j++) {
if (cTemp == cStr[j]) {
bTemp = true;
break;
}
}
if (!bTemp)
return false;
}
return true;
}
public static void main(String[] args) {
Programme1 mA = new Programme1();
boolean bMail = mA.isMail("tom@.com");
System.out.println("1 bMail is" + bMail);
bMail = mA.isMail("tom@.com");
System.out.println("2 bMail is" + bMail);
boolean bIsStr = mA.isString("wer");
System.out.println("1: bIsStr=" + bIsStr);
bIsStr = mA.isString("wer3");
System.out.println("2: bIsStr=" + bIsStr);
}
}
2024-12-22 14:53
2024-12-22 14:34
2024-12-22 14:30
2024-12-22 13:57
2024-12-22 12:36
2024-12-22 12:32