title: Dynamic string concat in java
body: <p>I want to contact two string.</p>
  
  <p>Here my code</p>
  
  <pre><code>public class StringTest {
  
   public String concat = "";
   public String txt = "Hello  "+concat;
  
   protected void print() {
      System.out.println("Output: " + txt);
   }
  
   public static void main(String[] args) {
      StringTest tb = new StringTest();
      tb.concat = "World";
      tb.print();
    }
  }
  </code></pre>
  
  <p>Output: Hello</p>
  
  <p>But I need "Hello World".
  It's possible ?</p>
  
  <p>Conditions:
    Should't re-assign variable (get/set , inside method)</p>