Create a byte array according to given String In Java
<p>I just need to create a byte array out of the given String.</p>

<p>For example, if my String is <code>String ss = "21331UA";</code> then the byte array elements should correspond to them as follows.</p>

<pre><code>2 1 3 3 1 U A
</code></pre>

<p>I could have created it statically as this. <code>byte[] arr = new byte[]{2,1,3,3,1,'U','A'}</code> But have to create this byte array in the runtime dyanamically as this changes time to time. Thats the problem.</p>

<p>I just tried as follows and print them, it contains their corresponding ASCII values.<strong>This is not what I want.</strong></p>

<pre><code>byte[] arr = ss.getBytes();

for(int i=0; i&lt;arr.length; i++)
{
    System.out.print(arr[i] + "  ");
}
Ans==&gt; 50  49  51  51  49  85  65
</code></pre>

<p>Really appreciate any guidance.... Thanks in advance</p>
