Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String[] argv) throws Exception {

        boolean retval = false;
        String date = "12/12/1212";
        String datePattern = "\\d{1,2}-\\d{1,2}-\\d{4}";
        retval = date.matches(datePattern);

    }
}