import java.util.*;
public class work {
Scanner input = new Scanner(System.in);
String email;
work() {
System.out.println("请输入你的Email地址");
email = input.next();
if (email.indexOf('@') != -1 && email.indexOf('.') > email.indexOf('@')) {
System.out.println("邮箱地址合法!");
} else {
System.out.println("邮箱地址无效。");
}
}
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
new work();
}
}
请输入你的Email地址