← Unit 1 · all exercises
Saved in this browser only

Say hello

Print a greeting on one line: the word Hello, a comma, a space, the name, then an exclamation mark. For the name "Ada" that is exactly: Hello, Ada!

void greet(String name)

Solution.java
Loading editor…
Results

Examples

  • greet(Ada) → Hello, Ada!
  • greet(Grace) → Hello, Grace!

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