import java.util.Scanner;public class HelloWorld {public void judge(String fileName,String email){//请在此添加实现代码/********** Begin **********/// 1. 判断文件名必须以 .java 结尾且名字不为空if (fileName.endsWith(.java) fileName.length() 5) {System.out.println(Java文件名正确);} else {System.out.println(Java文件名无效);}// 2. 获取 和 . 的位置int posAt email.lastIndexOf();// 错误2必须加 int 定义 posDotint posDot email.lastIndexOf(.); // . 的位置// 3. 判断规则有 有点 在.前面if (posAt ! -1 posDot ! -1 posAt posDot) {System.out.println(邮箱名正确);} else {System.out.println(邮箱名无效);}/********** End **********/}}