Analyzing the code you've wrote, seems that both 'A' and 'a' are being added to the Hashtable at the same index key. So, only the last 'A' will remain referenced. But, about the abnormal characters, it can be some limitations of the editor you are using the write java codes. This kind of characters "Ӓ" are really not common.
It looks like there's some confusion here caused by different encodings, and the fact that different browsers are rendering special characters differently. Here is what I think Akilan typed:
Some people may see it rendered like this:
While others see:
Now the thing is, if I take the first version of this code and run it, I get output of a and A, as expected. If that's not what Akilan is seeing... I think maybe Akilan's code is something different from my first guess above. Akilan, does your code match one of the versions I've shown above? If not, it might be easiest if you email me the lines of code, so I can see what you're really doing here without interference from web browsers. [ July 19, 2006: Message edited by: Jim Yingst ]
Your analysis is correct. When I use eclipse I am getting this problem. it saves abnormal character as ?.
Dear Jim,
I admire ur knowledge. My indended code is like second code snippet. even I do it in notepad(MS-Windows) I am facing the same problem .Moreover javac does not comple the file in Unicode format. So what will be the correct editor, so how we can handle special characters in Java.
Akilan - okay. Just ignore my first code sample; I thought maybe you were doing something different. From your description, this isn't necessarily a problem with Eclipse; it may also be a problem with the way your computer is set up, or with how you are getting these special characters. Are you copying/pasting from somewhere else? Never mind - even if you get the characters into eclipse and into the Java source correctly, there's a good chance that someone else who views the source code may not see it correctly unless their system is set up just right. So I recommend inside Java source, do not use any characters outiside the standard ASCII range 0-127. Instead, if you need to represent other characters you can use Unicode escapes: