import java.util.*;
public class fuxi_2 {
 Scanner input = new Scanner(System .in);
 String email;
 fuxi_2(){
  System.out.println("请输入你的Email地址");
  email=input.next();
  if (email.indexOf('@') != -1&& email.indexOf('.') > email.indexOf('@')) {
   System.out.println("邮箱地址合法!");
  } else {
   System.out.println("邮箱地址无效。");
  }
 }
 public static void main(String[] args) {
  new fuxi_2();
 }
}
java12周(2)第一题

相关文章:

  • 2022-12-23
  • 2021-05-23
  • 2021-12-05
  • 2021-11-19
  • 2022-12-23
  • 2021-04-07
  • 2021-11-09
  • 2021-10-11
猜你喜欢
  • 2021-11-07
  • 2021-10-17
  • 2022-01-29
  • 2022-12-23
  • 2021-12-05
  • 2021-06-02
相关资源
相似解决方案