According to the Java API, the constructor Date(year, month, day) is deprecated. I know that I can replace it with the following code:
Date(year, month, day)
Calendar myCa
You could use
new SimpleDateFormat( "yyyyMMdd" ).parse( "20100520" )