java concatenate two strings error
<p>I have one function that returns me String :</p>

<pre><code>public String getString(String password){

          ......

    try {
    .......
        encodedPassword =  Base64.encodeToString(msgDigest,1 );

    } catch (UnsupportedEncodingException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    } catch (NoSuchAlgorithmException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }

    return encodedPassword;

    }
</code></pre>

<p>I want to add (concatenate) "=" String to returning string from function</p>

<p>I try using this:</p>

<pre><code>encrptdPassword = getString("1234");
encrptdPassword = encrptdPassword+"=";
</code></pre>

<p>Or:</p>

<pre><code>encrptdPassword = encrptdPassword .concat("=");
</code></pre>

<p>but I get result like two different objects (space or brake between)</p>

<p>I think problem is in Base64.encodeToString , but I must use 64 based string </p>

<hr>

<p>Function <code>getString</code> returns me:</p>

<pre><code>A6xnQhbz4Vx2HuGl4lXwZ5U2I8iziLRFnhP5eNfIRvQ
</code></pre>

<p>I want to add <code>=</code> to the returning string as:</p>

<pre><code>A6xnQhbz4Vx2HuGl4lXwZ5U2I8iziLRFnhP5eNfIRvQ=
</code></pre>

<p>but I receive this on output </p>

<pre><code>A6xnQhbz4Vx2HuGl4lXwZ5U2I8iziLRFnhP5eNfIRvQ = 
</code></pre>

<p>Or:</p>

<pre><code>A6xnQhbz4Vx2HuGl4lXwZ5U2I8iziLRFnhP5eNfIRvQ
=
</code></pre>

<p>...like 2 different strings.</p>

<p>Where I'm wrong?</p>
