X9: makeTags

Write a function in Java that implements the following logic: The web is built with HTML strings like <i>Yay</i> which draws Yay as italic text. In this example, the "i" tag makes <i> and </i> which surround the word "Yay". Given tag and word strings, rerturn the HTML string with tags around the word, e.g. <i<Yay</i>.

Examples:

makeTags("i", "Yay") -> "<i>Yay</i>"
makeTags("i", "Hello") -> "<i>Hello</i>"
makeTags("cite", "Yay") -> "<cite>Yay</cite>"

Your Answer:

Feedback

Your feedback will appear here when you check your answer.