X6: helloName

Write a function in Java that implements the following logic: Given an argument name, it should return a greeting of the form "Hello xxx!" where xxx is the value passed in name.

Examples:

helloName("Bob") -> "Hello Bob!"
helloName("Alice") -> "Hello Alice!"

Your Answer:

Feedback

Your feedback will appear here when you check your answer.