import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.GregorianCalendar;
public class simpledateformate {

 private SimpleDateFormat sdf=null;
private SimpleDateFormat buf;
 public String getDate()
 {
 StringBuffer buf = new StringBuffer();
 Calendar calendar = new GregorianCalendar();
 buf.append(calendar.get(Calendar.YEAR));
 buf.append(calendar.get(Calendar.MONTH));
 buf.append(calendar.get(Calendar.DAY_OF_MONTH));
 buf.append(calendar.get(Calendar.HOUR_OF_DAY));
 buf.append(calendar.get(Calendar.MINUTE));
 this.sdf= new SimpleDateFormat("yyyy年MM月dd日hh小时mm分");
     buf =this.sdf.format(new Date());

return  buf;
 }
public static void main(String[] args) {
System.out.println(new simpledateformate().getDate());
}
}
我这个是有错的往下不会写了,帮我写好以下,最好有讲解为什么这么写 多谢