DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
Date date = format.parse("2015-10-2");
Timestamp timestamp = new Timestamp(date.getTime());
System.out.println(new Date(timestamp.getTime()));
System.out.println(format.format(new Date(timestamp.getTime())));