1import java.text.SimpleDateFormat;
2import java.util.Date;
3public class StringToDateExample1 {
4public static void main(String[] args)throws Exception {
5 String sDate1="31/12/1998";
6 Date date1=new SimpleDateFormat("dd/MM/yyyy").parse(sDate1);
7 System.out.println(sDate1+"\t"+date1);
8}
9}