public static void copyProperties(Properties from,Properties to){
  Enumeration<Object> keys=from.keys();
  while (keys.hasMoreElements()) {
    String key=(String)keys.nextElement();
    to.put(key,from.getProperty(key));
  }
}

public static void copyProperties ( Properties from , Properties to ) { Enumeration < Object > keys = from . keys ( ) ; while ( keys . hasMoreElements ( ) ) { String key = ( String ) keys . nextElement ( ) ; to . put ( key , from . getProperty ( key ) ) ; } }
copy the contents from one properties object to another .
