Lets define a date in the form of a String
String ds = "15/03/2000";
Then we use object of a class called SimpleDateFormat In the constructor of this SimpleDateFormat pass the format of the date which we have Like in our case the format of date which we want to pass is in the format dd/MM//yyyy Note dd is small,MM is capital and yyyy is small as well ,So we pass that
SimpleDateFormat s = new SimpleDateFormat("dd/MM/yyyy");
Then make an object of Date Class and use parse function of SimpleDateFormat to parse the String date
Date d1 = s.parse(ds);
Then to get the month from the date object we again make an object of SimpleDateFormat But as we want to get the month so we pass the arguments as MMMM
s = new SimpleDateFormat("MM");
To get the month in alphabets like January,Feb etc type
s = new SimpleDateFormat("MMMM");
Then we store the month we get from Date object d1 using s in the form of a String
String m = s.format(d1);
System.out.println(m);
Similarly we can get the year and day etc
s = new SimpleDateFormat("yyyy");
String y = s.format(d1);
System.out.println(y);
s = new SimpleDateFormat("dd");
String day = s.format(d1);
System.out.out.println(day);
So to conclude to convert a String to date make an object of SimpleDateFormat class and then make an object of date class and use parse function on dataformatter and pass the String into it. To get a String from a date object make object of Stringformatter class and then use the format function on this object and pass the date object into it.