I want to make a simple code, that prompts you to enter names, separated by comma or just a space, and when you click enter, to take every one word you entered, and put a @gmail.com at the end of it, how can I do it? That's what I have for now
Scanner input = new Scanner(System.in);
String mail = "@gmail.com";
String names;
System.out.println("Enter names: ");
names = input.next();
System.out.println(names + mail);