How to represent single quote character literal in Java?
<p>I'm trying to run a simple program that takes a String as an input
and returns the same String only with changes to certain characters
(flip <code>.</code> and <code>,</code> change <code>!</code> to <code>?</code> etc).</p>

<p>Most of the time I just read the original String char by char and each time a char meets one of my criterias, it is modified.</p>

<p>There is one char I'm having an issue with. I wish that every time a user
types in <code>'</code> I would return them <code>w</code>.</p>

<p>I tried to do this:</p>

<pre><code>if ( charInput == ' ' '){
    return 'w'
}
</code></pre>

<p>Of course it doesn't compile. How should I bypass this problem?</p>