title: How to properly escape special characters (like - ') in SOQL queries from Java code?
body: <p>I have a Java class where I construct SOQL queries using <code>String</code> concatenation.</p>
  
  <p>Is there any best practice which someone can suggest to escape SOQL special characters like single quotes?</p>