1.javaԴ?源码帝国美女源码?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-11-28 02:15
2024-11-28 02:02
2024-11-28 01:44
2024-11-28 01:40
2024-11-28 00:51
2024-11-28 00:20