Java : how to replace my last char in a string
<p>I am trying to replace the last char in my String .</p>

<pre><code>String bowlNumber = 1.1;

bowlNumber.replace(bowlNumber.charAt(bowlNumber.length-1), 2);
</code></pre>

<p>By this I am able to replace my last character i.e 1  to   2..
 but the problem is as my first character is also 1 , it also changes that to 2.</p>

<p>What i want is to  change 1.1   to  1.2 ,  but it makes 1.1  to  2.2</p>

<p>Any idea?</p>
