+ 3
What is different mean ' or " ?
7 Antworten
+ 4
In C-style languages ' denotes a character and " denotes a string. In Python there is no difference except that 's can be included in "s (print("My phone's battery isn't very good")) and "s can be included in 's (print('A great person once said "With great power comes great responsability" ').
+ 11
as Toni Isotalo said its depends on the languages
C:
Single quotes are characters ( char ), double quotes are null-terminated strings ( char * ). Single quotes are for a single character. Double quotes are for a string (array of characters). You can use single quotes to build up a string one character at a time,
PHP:
It is slightly faster to use single quotes. PHP won't use additional processing to interpret what is inside the single quote. when you use double quotes PHP has to parse to check if there is any variables in there. A single-quoted string does not have variables within it interpreted.
JAVASCRIPT:
There is no special difference between single and double quotes (like it is in PHP). The only actual difference is that you can write a double quote " in a single-quoted string without escaping it, and vice versa. They work the same, but they must match.
JAVA:
Use single quotes for literal char s, double quotes for literal String s, like so: char c = 'a'; String s = "hello"; They cannot be used any other way around (like in Python, for example). A char is a single UTF-16 character, that is a letter, a digit, a punctuation mark, a tab, a space or something similar.
SQL:
You can store string with single and double quotes. But... single quotes are used to indicate the beginning and end of a string in SQL. Double quotes generally aren't used in SQL, you use them in order to store lets say the whole SQL statement(query), in a variable so you can use it later in your code.
+ 4
depends on the language
+ 3
Awsome!!!
I wonder it in Python.
I really understand it now. Thank you for your answer.
+ 2
>>print('Hello')
Hello
>>print("Hello")
Hello
+ 1
Wow :0, Thanks you.
+ 1
depends upon the platform you are using.. u will be familiar when you start to use the particular language