import java.text.SimpleDateFormat;
import java.util.Calendar;
publicclass Main {
publicstaticvoid main(String[] args) {
// Create new calendarCalendar cal = Calendar.getInstance();
// Create instance of SimpleDateFormat class using patternSimpleDateFormat dateFormatter1 = newSimpleDateFormat("MMMMM dd yyyy");
String result = null;//www.java2s.com
result = dateFormatter1.format(cal.getTime());
System.out.println(result);
dateFormatter1.applyPattern("MM/dd/YY hh:mm:ss");
result = dateFormatter1.format(cal.getTime());
System.out.println(result);
dateFormatter1.applyPattern("hh 'o''clock' a, zzzz");
result = dateFormatter1.format(cal.getTime());
System.out.println(result);
}
}