SHARE
TWEET

Untitled

a guest Jun 25th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. KEY=VALUE
  2.      
  3. 1=value
  4. 2=value
  5. 3=value
  6.      
  7. public void save(HashMap<Integer, String> map) {
  8.         try {
  9.             File zone1 = new File("zones/zone1");
  10.             FileOutputStream fileOut = new FileOutputStream(zone1);
  11.             PrintWriter print = new PrintWriter(fileOut);
  12.             for (Map.Entry<Integer, String> m : map.entrySet()) {
  13.                 print.println(m.getKey() + "=" + m.getValue());
  14.             }
  15.  
  16.             print.flush();
  17.             print.close();
  18.             print.close();
  19.         } catch (Exception e) {
  20.         }
  21.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top