· 9 years ago · Sep 22, 2016, 07:40 PM
1String[] index = s.split("@");
2 for (String words : index) {
3 System.out.println(words);
4 if (words == "gmail.com"){
5 System.out.println("your domain is Correct" + words);
6 }
7 else{
8 System.out.println("PLease Enter Correct Domain Address");
9 }
10 }