package name.aspx;import java.util.Date;
import java.util.Locale;
import java.text.DateFormat;class ForDate
{
public static String getDateTime()
{
DateFormat df = DateFormat.getDateTimeInstance(
DateFormat.MEDIUM,DateFormat.MEDIUM,Locale.CHINA);
String now = df.format(new Date());
return now;
}
}
import java.util.Locale;
import java.text.DateFormat;class ForDate
{
public static String getDateTime()
{
DateFormat df = DateFormat.getDateTimeInstance(
DateFormat.MEDIUM,DateFormat.MEDIUM,Locale.CHINA);
String now = df.format(new Date());
return now;
}
}
解决方案 »
- 关于流的问题--流每执行到read方法是不是就阻塞?
- junit测试驱动开发代码报错
- 设置IntegerCache的上界
- 数据类型的计算问题
- 有谁帮我看看这个游戏出错在哪了?为什么设置了ActionListener,KeyListener就不行了?
- 日期格式转换问题,各位高手帮帮忙啊,解决了分送上
- 实在看不太懂,请各位大侠解释下
- 测试创建对象分配了多少内存,怎么结果是这样呢?
- 请问不懂C++直接学JAVA学的好吗?对类的概念也不懂!(详情请进来看一下,谢谢)
- 怎么能让按钮点击时,不出现灰色背景,就象jbuilder中的工具栏那样?
- ArrayList和HashMap的问题
- 菜鸟问:frame的窗口大小怎改变?
source是你的原字符串,该方法以空格为拆分符!