Question: Why this code doesn't raise a 'ParseException' ?

```
DateFormat formatter = new SimpleDateFormat("dd/mm/yyyy");
try {
     String date = "01/01/200'";
     formatter.parse(date);
} catch (ParseException ex) {
     throw new ParseException("Formato de fecha inválido",0);
}

```

Please explain that to me, I'm lost on that. And note the simple quote `'`

Answer: 
Because it's what is supposed to do.
If you check the [docs on DateFormat](http://download.oracle.com/javase/6/docs/api/java/text/DateFormat.html) it says about the parameter.

`source - A String whose beginning should be parsed.`

If you want to restrict the format, you'll have to use regular expressions.

Also check the rules of [SimpleDateformat](http://download.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html) about the year:

`For parsing, if the number of pattern letters is more than 2, the year is interpreted literally, regardless of the number of digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.`
According to the Javadocs for [`SimpleDateFormat`](http://download.oracle.com/javase/1.4.2/docs/api/java/text/SimpleDateFormat.html)

> 
> For parsing, if the number of pattern letters is more than 2, the year is interpreted literally, regardless of the number of digits. So using the pattern "MM/dd/yyyy", "01/11/12" parses to Jan 11, 12 A.D.
> 
> 
> 

So I suspect this parses the year as 200 A.D.

I just ran your program and that's what's going on. The converted `Date` is:

```
Date = Tue Jan 01 00:01:00 EST 200

```