Decoding and encoding a certain portion of a String into X'es?
<p>I have to complete a program where the criteria is as follows:</p>

<ul>
<li>Objects created from the <em>Code</em> class have one parameter: (String code)</li>
<li>The <em>Code</em> class has two methods: hide(int p1, int p2) and recover(int p1, int p2).</li>
<li>Hiding replaces all of the characters within the index range of p1 to p2 with "XXXX..."</li>
<li>Recovering replaces all of the X'es with the original text.</li>
</ul>

<p>I am completely stumped as to how to approach this. I have tried multiple approaches, but I always wind up overcomplicating it and confusing myself.</p>

<p>Any ideas?</p>
