Possible Duplicate:
Is there a difference between single and double quotes in Java?
I’ve seen some code which uses the ‘ ‘ version to subtract character values from each other which I didn’t think was possible which got thinking as to what exactly they infer that is different?
What is the difference between ” ” and ‘ ‘? (How do they change how the code sees what ever is within the apostrophes / quotation marks etc.)
The difference is a matter of type.
" "is a string literal, a Java String containing only a space character, and' 'is a character literal, or a literal Javachar. The String could contain 1char, 2, 3, or more, and Strings are made up of an underlying array ofcharvalues like' '.