/**
 * Description:Properties是HashTable的子類,其存儲形式鍵值對。
 */
import java.util.*;
public class PropertysTest {
public static void main(String[] args)
{
 Properties sp=System.getProperties();    
 for(Enumeration e=sp.propertyNames();e.hasMoreElements();)
 {
     String key=(String)e.nextElement();
     System.out.println("鍵:");
     System.out.println(key);
     String name=sp.getProperty(key);
     System.out.println("值:");
     System.out.println(name);
 }
}
}

 

相关文章:

  • 2022-12-23
  • 2021-09-22
  • 2022-12-23
  • 2021-09-19
  • 2022-12-23
  • 2022-01-28
  • 2021-05-24
  • 2021-11-07
猜你喜欢
  • 2021-07-30
  • 2021-10-12
  • 2021-05-09
  • 2022-12-23
  • 2022-12-23
  • 2021-05-31
  • 2021-09-17
相关资源
相似解决方案