My problem is not "how to do it", my problem is the corner cases involved. Here is my code and test case.

```
package datetest.com;

import java.text.ParseException;
import java.text.SimpleDateFormat;

public class MultipleDateParserFormat {
    private final static String[] PossibleDateFormat=new String[]{
        "MM/dd/yyyy",
        "MM.dd.yyyy",
        "MM-dd-yyyy",
        "yyyy/MM/dd",
        "yyyy.MM.dd",
        "yyyy-MM-dd",
        "dd/MM/yyyy",
        "dd.MM.yyyy",
        "dd-MM-yyyy"
        };

    public MultipleDateParserFormat(){};
    public void checkParseDate(String passedDate){
        int PossibleDateFormatLength=PossibleDateFormat.length;

        for(int i=0;i<PossibleDateFormatLength;i++){
            try {
                SimpleDateFormat simpleDateFormant=new SimpleDateFormat(PossibleDateFormat[i]);
                simpleDateFormant.setLenient(false);
                java.util.Date date= simpleDateFormant.parse(passedDate);
                System.out.println(date);

            } catch (ParseException e) {

                System.out.println("Parse Exception Occured for your input Value"+passedDate + "for format" + PossibleDateFormat[i]);
            }
        }

    }

    public static void main(String...strings){

        String passedDate="4-03-1992";// This test case is validating against two Pattern 

        MultipleDateParserFormat multipleDateParserFormat= new MultipleDateParserFormat();
        multipleDateParserFormat.checkParseDate(passedDate);
    }

}

```

Here is the OUTPUT that I am getting when I run this code:

```
Parse Exception Occured for your input Value4-03-1992for formatMM/dd/yyyy
Parse Exception Occured for your input Value4-03-1992for formatMM.dd.yyyy
Fri Apr 03 00:00:00 IST 1992
Parse Exception Occured for your input Value4-03-1992for formatyyyy/MM/dd
Parse Exception Occured for your input Value4-03-1992for formatyyyy.MM.dd
Parse Exception Occured for your input Value4-03-1992for formatyyyy-MM-dd
Parse Exception Occured for your input Value4-03-1992for formatdd/MM/yyyy
Parse Exception Occured for your input Value4-03-1992for formatdd.MM.yyyy
Wed Mar 04 00:00:00 IST 1992

```

Since my test case is satisfying two given patterns, I'm getting two outputs.

How can I avoid such cases here? What are other ways to do such multiple pattern validation?