Commit bdd6b71
committed
feat: Use escape sequences to print double quotes in strings [quote-escape]
🔑 Key: quote-escape
🧠 Logic:
- To include double quotes (`"`) within a string in Java, use the escape character (`\"`).
- Example:
➤ `"She said, \"Hello!\""` → prints: She said, "Hello!"
➤ `"This string contains \"quotes\"."` → prints: This string contains "quotes".
📘 Purpose:
- Useful for formatting dialogue, JSON strings, or quoted output in terminals and files.
- Prevents syntax errors that occur when raw quotes are misinterpreted as string boundaries.
Signed-off-by: Somesh diwan <[email protected]>1 parent 7109c26 commit bdd6b71
1 file changed
+6
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
0 commit comments