import java.util.Scanner;
public class Youxiang {
public static void main(String[] args) {
String email=null;
int a=0;
while(a++<=3){
Scanner input=new Scanner(System.in );
System.out.print("请输入email地址 :");
email=input.next();
if (email.indexOf('@') != -1
&& email.indexOf('.') > email.indexOf('@')) {
System.out.println("邮箱地址合法!");
}
else {
System.out.println("邮箱地址无效。");
break;
}
if (a == 3) {
System.out.println("次数超限!请3小时以后再试;");
break;
}
}
}
}
public class Youxiang {
public static void main(String[] args) {
String email=null;
int a=0;
while(a++<=3){
Scanner input=new Scanner(System.in );
System.out.print("请输入email地址 :");
email=input.next();
if (email.indexOf('@') != -1
&& email.indexOf('.') > email.indexOf('@')) {
System.out.println("邮箱地址合法!");
}
else {
System.out.println("邮箱地址无效。");
break;
}
if (a == 3) {
System.out.println("次数超限!请3小时以后再试;");
break;
}
}
}
}