1. <tt id="5hhch"><source id="5hhch"></source></tt>
    1. <xmp id="5hhch"></xmp>

  2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

    <rp id="5hhch"></rp>
        <dfn id="5hhch"></dfn>

      1. Java中將毫秒轉(zhuǎn)化為日期的方法

        時(shí)間:2020-09-21 12:33:14 SUN認(rèn)證 我要投稿

        Java中將毫秒轉(zhuǎn)化為日期的方法

          將毫秒轉(zhuǎn)化為日期

          import java.awt.BorderLayout;

          import java.awt.Frame;import java.awt.TextArea;

          import java.awt.TextField;

          import java.awt.event.ActionEvent;

          import java.awt.event.ActionListener;

          import java.awt.event.WindowAdapter;

          import java.awt.event.WindowEvent;

          import java.text.SimpleDateFormat;

          import java.util.Date;

          public class ConvertLong2Date extends Frame

          {

          TextField tf = new TextField();

          TextArea ta = new TextArea();

          public static void main(String[] args)

          {

          new ConvertLong2Date()。launchFrame();

          }

          public String convertL2D(long l)

          {

          long _l = 0L;

          Date _d = null;

          SimpleDateFormat _sdf = null;

          String _s = null;

          _l = l;

          _d = new Date(_l);

          _sdf = new SimpleDateFormat(“yyyy-MM-dd HH:mm:ss”);

          _s = _sdf.format(_d);

          return _s;

          }

          public void launchFrame()

          {

          setLocation(300, 300);

          setSize(480, 320);

          setResizable(false);

          add(tf,BorderLayout.SOUTH);

          add(ta,BorderLayout.NORTH);

          pack();

          tf.addActionListener(new tfActionListener());

          this.setVisible(true);

          this.addWindowListener(new WindowAdapter()

          {

          public void windowClosing(WindowEvent e)

          {

          System.exit(0);

          }

          });

          }

          public class tfActionListener implements ActionListener

          {

          public void actionPerformed(ActionEvent e)

          {

          long l = Long.parseLong(tf.getText());

          ta.setText(new ConvertLong2Date()。convertL2D(l));

          tf.setText(“”);

          }

          }

          }

        【Java中將毫秒轉(zhuǎn)化為日期的方法】相關(guān)文章:

        Java中日期的處理方法10-05

        CAD中將圖形改為需要尺寸的方法05-18

        CAD中將圖形前置和后置的方法12-12

        Java byte[]轉(zhuǎn)int如何實(shí)現(xiàn)09-23

        Java線程同步的方法09-27

        Java枚舉的常用方法10-16

        java中的方法重載與方法重寫05-18

        JAVA認(rèn)證開源技術(shù):關(guān)于Java的對(duì)象equals方法05-14

        国产高潮无套免费视频_久久九九兔免费精品6_99精品热6080YY久久_国产91久久久久久无码

        1. <tt id="5hhch"><source id="5hhch"></source></tt>
          1. <xmp id="5hhch"></xmp>

        2. <xmp id="5hhch"><rt id="5hhch"></rt></xmp>

          <rp id="5hhch"></rp>
              <dfn id="5hhch"></dfn>