import java.util.*;
import java.io.*;
class  AboutDate
{
 public static void main(String[] args)
 {
  Properties p = new Properties();
  Properties p1 = new Properties();
  p.setProperty("Title","The java training");

  try
  {
   p.store(new FileOutputStream("property.why"),"about");
  }
  catch(IOException e)
  {
   e.printStackTrace();
  }
  catch(Exception e)
  {
   e.printStackTrace();
  }
  try
  {
   p1.load(new FileInputStream("property.why"));
   System.out.println(p1.getProperty("T2itle", "Error"));

  }
  catch(Exception e)
  {
  }
  Date d1 = new Date();
  System.out.println(d1.getHours());
  System.out.println(d1.getDay());
  System.out.println(d1.getYear());
  System.out.println(d1.getMonth());
 }
}

相关文章:

  • 2021-09-13
  • 2021-10-03
  • 2021-07-08
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-12-29
  • 2021-10-08
  • 2022-12-23
  • 2021-11-13
  • 2022-02-17
  • 2022-12-23
相关资源
相似解决方案