title: Storing in String
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1642159/whats-the-most-elegant-way-to-concatenate-a-list-of-values-with-delimiter-in-jav">What&#39;s the most elegant way to concatenate a list of values with delimiter in Java?</a>  </p>
  </blockquote>
  
  
  
  <p>I have 3 different words listed in property file in 3 different lines. 
  QWERT
  POLICE
  MATTER</p>
  
  <p>I want to read that property file and store those 3 words in String, not in aarylist separated by whitespace. The output should look like this
  String str = { QWERT POLICE MATTER}</p>
  
  <p>Now I used the follwoing code and getting the output without white space in between the words: 
  String str = {QWERTPOLICEMATTER}. What should I do to the code to get the string result with words separated by whitespace.</p>
  
  <pre><code>FileInputStream in = new FileInputStream("abc.properties");
              pro.load(in);
              Enumeration em = pro.keys();
              StringBuffer stringBuffer = new StringBuffer();
              while (em.hasMoreElements()){
                 String str = (String)em.nextElement();
                 search = (stringBuffer.append(pro.get(str)).toString());
  </code></pre>