java language
Please use the the language of your choice to complete the following problem:
Write a function or procedure that returns a hyphenated string. Valid input will be a string consisting only of alpha characters. Your function or procedure will return an alpha string where the interior letters are joined with a hyphen. For strings containing invalid input (non-alpha characters) please return an empty string (“” in most languages).
Please write a comment in your code to tell us the programming language you choose to use.
Example input:
Test
ou4
it
Example output:
T-e-s-t
i-t