DRAFT
LiteralString
Misconception:
When passing literal strings to methods,
one can simply write the contents of the string
between the method argument parentheses, like print(Hello)
.
Because there are parentheses, there is no need for quotes.
Incorrect
When passing a literal string as argument to a method, no quotes are needed
Correct
String literals always must be surrounded by quotes
CorrectionHere is what's right.
Here is what's right.
String literals always need to be written inside double quotes: print("Hello")
.