title: How to insert backslash into my string in java?
body: <p>I have string, and I want to replace one of its character with backslash \</p>
  
  <p>I tried the following, but no luck.</p>
  
  <pre><code>engData.replace("'t", "\\'t")
  </code></pre>
  
  <p>and</p>
  
  <pre><code>engData = engData.replace("'t", String.copyValueOf(new char[]{'\\', 't'}));
  </code></pre>
  
  <p>INPUT : "can't"</p>
  
  <p>EXPECTED OUTPUT : "can\'t"</p>
  
  <p>Any idea how to do this?</p>