When I used the following code, the Date
Object was wrong.
Date date = new Date(day.getYear(), day.getMonth(), day.getDay());
Can
You can do it with a workaround if you're stuck to Java < 8, but it's very ugly:
java.util.Date date = new java.text.SimpleDateFormat("dd.MM.yyyy").parse("05.08.2015");
as @Thomas already stated, the default Constructor for date/month/year is deprecated. Probably take a look at this link if you have access to Java8.