← Unit 1 · all exercises
Saved in this browser only

Say it twice

Print the word you are given on one line, then print it again on the next line.

void twice(String word)

Solution.java
Loading editor…
Results

Examples

  • twice(echo) → echo echo
  • twice(Java) → Java Java

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