title: HashMap: containsKey() Not true when it should be?
body: <p>I am currently throwing an obfuscation program for school homework together. I am trying to make the program read a file and then create a new file that replaces each letter in the file with some a corresponding value that I pull from a <code>HashMap</code>. I set up a whole bunch of keys and values, but later in the process of writing the new file I try to check if the map contains a key before appending to the new <code>String</code>. The characters that are checked are in fact in the file that I am reading from to test, and the file is read correctly. Yet it fails with the <code>encryptionDict.containsKey()</code> (my hashmap) method.</p>
  
  <p>I hope some Java expert can help me figure this out! I'm pretty clueless, I'm more of a C and D guy. The only thought that struck me was that it would be something like with Strings where <code>"foo" != "foo"</code>. But chars aren't objects.</p>
  
  <p>The code is in a pastebin below, the key parts to look at is the class constructor, the method encrypt, and the method <code>initDictionary</code>, also can someone tell me why <code>HashMap&lt;char, String&gt;</code> is invalid, is it because I have to use an object?</p>
  
  <p>The code: <a href="http://pastebin.com/NcHTHPfw" rel="nofollow noreferrer">http://pastebin.com/NcHTHPfw</a></p>