当前位置: 代码迷 >> Eclipse >> 请高手帮小弟我看上哪里异常了,小弟我编译不出来,小弟我还是菜鸟
  详细解决方案

请高手帮小弟我看上哪里异常了,小弟我编译不出来,小弟我还是菜鸟

热度:60   发布时间:2016-04-23 11:29:22.0
请高手帮我看下哪里错误了,我编译不出来,我还是初学者
public class helloworld{
/**
* author:wonderful
*/
public static void main(String [] args){
// TOD Auto-generated method stub
System.out.println("helloworld,当前的时间:");
SimpleDateFormar Foramt =
  new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
format.setlenient(false);
System.out.println(format.format(new Date()));
}
}

------解决方案--------------------
Java code
System.out.println("helloworld,当前的时间:");SimpleDateFormat Foramt =    new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");Foramt.setLenient(false);System.out.println(Foramt.format(new Date()));
------解决方案--------------------
Java code
import java.text.SimpleDateFormat;import java.util.Date;public class helloworld {    /**     * author:wonderful     */    public static void main(String[] args) {        // TOD Auto-generated method stub        System.out.println("helloworld,当前的时间:");        SimpleDateFormat Format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");        Format.setLenient(true);        System.out.println(Format.format(new Date()));    }}
  相关解决方案