title: How to replace even values in string with ASCII value?
body: <p>Suppose I have a string as <code>ABCDEFG</code>. I want to replace the even values of this string with their ASCII value. How should I do?</p>
  <pre class="lang-java prettyprint-override"><code>//STRING IS STORED IN str
  for (int i = 0; i &lt; str.length(); i++) {
      if (i % 2 != 0) { //FOR EVEN SPACES
          int m = str.charAt(i);
          //GOT ASCII VALUE OF even spaces
          System.out.println(&quot;Converted ASCII VALUES ARE&quot; + m);
      }
  }
  </code></pre>