Print Text with Quotes
This program demonstrates printing double quotes inside text.
Problem Statement
Write a Java program that prints text with double quotes.
Source Code
| 1 | public class QuotesEscape { |
| 2 | public static void main(String[] args) { |
| 3 | System.out.println("Eduinq says \"Java is powerful\""); |
| 4 | } |
| 5 | } |
Program Output
Eduinq says "Java is powerful"
Explanation
The \" escape sequence allows double quotes to be included inside a string literal, so the text prints with quotes included, showing how to include quotes in output using escape sequences.