title: How to split Set<String> in Java or Android
body: <pre><code>private SharedPreferences sharedpre = null;
  private SharedPreferences.Editor saveuser = null;
  
  Set&lt;String&gt; pathNamesImage = new HashSet&lt;String&gt;();
  saveuser = sharedpre.edit();
  
  pathNamesImage.add(pathLocal);
  saveuser.putStringSet("prePathNames", pathNamesImage);
  </code></pre>
  
  <p>In the above code, I would like to get each string by <code>split()</code> method or any other method as per its size. Since all the values are in <code>Set</code>. <br> I am not able to get each values like using <code>split()</code> method for array. So, can anybody help me please.</p>