import java.text.*; //SimpleDateFormat
import java.util.*; //Date
class MyClass
{
public static void main (String[] args)
{
SimpleDateFormat sdt = new SimpleDateFormat ("d-y-M");
Date today = new Date();
String msg = sdt.format(today);
System.out.println(msg);
}
}
此代码给出输出:“31-2012-12”.. 但我想要如下:“31 - 2012 - 12”..