← Unit 1 · all exercises
Saved in this browser only

Put it in quotes

Print the given text wrapped in double quotes. For hello, print exactly: "hello" — including the quote marks. A quote inside a String is written \".

void quoted(String text)

Solution.java
Loading editor…
Results

Examples

  • quoted(hello) → "hello"
  • quoted(Java) → "Java"

There are also 2 hidden tests you can't see. Solve the problem, not the examples.