title: Remove duplicate values from a string in java
body: <p>Can anyone please let me know how to remove duplicate values from </p>
  
  <pre><code>String s="Bangalore-Chennai-NewYork-Bangalore-Chennai"; 
  </code></pre>
  
  <p>and output should be like</p>
  
  <pre><code>String s="Bangalore-Chennai-NewYork-";
  </code></pre>
  
  <p>using Java..</p>
  
  <p>Any help would be appreciated.</p>