Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as Java by tierney ( 5 years ago )
/**
* This program states what the username of the email is
and what the domain is
* @tierney
* 3-12-21
*/
import java.util.Scanner;
public class SpliceEmail
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);
System.out.println("Input your email address");
String email = in.nextLine();
int atLoc = email.indexOf("@");
System.out.println("The username of the email is " + email.substring(0, atLoc));
System.out.println("The domain of the email is " + email.substring(atLoc + 1));
}
}
Revise this Paste