Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Scanner;
import java.util.regex.Pattern;

public class Main {

    public static void main(String[] args) {
        Scanner scn = new Scanner(System.in);
        String userName;
        System.out.println("Enter your email address: ");
        userName = scn.findInLine(Pattern.compile("[a-z]+"));

        System.out.println(userName);
    }

}